Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to get current time zone and display in cell in Excel?

Author Siluvia Last modified

When working with Excel spreadsheets, particularly in collaborative or international contexts, it can be important to know the exact time zone set on the system you are using. By identifying and displaying your current system time zone directly in an Excel cell, you can ensure the accuracy of time-sensitive calculations, reporting, or data comparison—especially if files may be shared across users in different regions. Unfortunately, Excel doesn’t provide a built-in function to extract system time zone information directly within a cell.

Get current time zone and display in cell with User-defined function


Get current time zone and display in cell with User-defined function

To extract and display your system's current time zone directly into an Excel cell, you can use a user-defined function (UDF) written in VBA. This method provides a practical solution, particularly when you frequently need this information inside your workbook. Here’s how to do it step by step:

Note: This approach works best if macros are enabled in your Excel environment and you are allowed to run VBA code. It reads the regional setting directly from the Windows system configured on your computer.

1. Press the Alt + F11 keys simultaneously. This opens the Microsoft Visual Basic for Applications (VBA) editor window.

2. In the VBA editor, locate the project pane on the left, then click Insert > Module. This adds a new module to your workbook where you can enter custom code. Carefully copy and paste the following VBA code into the blank module window:

VBA code: Get current time zone in Excel

Function GetTimeZoneAtPresent() As String
'Updated by Extendoffice 20180814
    Dim xObjIs, xObjI
On Error GoTo ER
    Set xObjIs = GetObject("winmgmts:\\.\root\cimv2").ExecQuery("Select * From Win32_TimeZone")
    If xObjIs.Count = 1 Then
        For Each xObjI In xObjIs
            If Len(xObjI.Caption) > 1 Then
                GetTimeZoneAtPresent = xObjI.Caption
                Exit Function
            Else
                GetTimeZoneAtPresent = "Null"
                Exit Function
            End If
        Next
    End If
ER:
    GetTimeZoneAtPresent = "Failed"
End Function

Be sure to copy the entire code above. Before you run macros or the UDF, make sure your macro settings allow you to run code. If you encounter an error or security warning, adjust your macro settings via File > Options > Trust Center > Trust Center Settings > Macro Settings.

3. After pasting the code, press Alt + Q to close the VBA editor and return to Excel.

4. Choose any cell where you want to display the time zone, enter this formula: =GetTimeZoneAtPresent(), then press Enter. The current time zone set on your system should appear instantly in the selected cell.

This method is particularly effective for automated reporting templates or dashboards that may be shared across colleagues in different geographic locations where time zone clarity is essential. However, remember that UDFs will work only when the workbook is saved as a macro-enabled file (.xlsm). If you transfer the file or send it to someone with macros disabled, the result may not be updated or displayed.

See screenshot for clarity:

get the time zone detail use a user defined function

If the result does not appear or an error is displayed, check that:

  • Your macro settings permit running VBA code.
  • The code was copied entirely and without modification.
  • You are not in Excel Online or a restricted environment (VBA solutions are limited to desktop Excel).

To update or refresh the time zone information, simply recalculate the sheet (press F9) or re-enter the formula if the system's time zone has changed during your Excel session.

Tip: This result will reflect your computer’s operating system settings. If you share the file, each user can see their own system’s time zone by recalculating the formula in their local Excel environment.


a screenshot of kutools for excel ai

Unlock Excel Magic with Kutools AI

  • Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
  • Custom Formulas: Generate tailored formulas to streamline your workflows.
  • VBA Coding: Write and implement VBA code effortlessly.
  • Formula Interpretation: Understand complex formulas with ease.
  • Text Translation: Break language barriers within your spreadsheets.
Enhance your Excel capabilities with AI-powered tools. Download Now and experience efficiency like never before!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in