Shortcut to Enter GMT

by Allen Wyatt
(last updated November 18, 2016)

8

When Farol uses the shortcut Ctrl+Shift+; Excel enters the local time in the cell. He wonders if there is any way to have it, instead, enter GMT (+7 or +8 hours) into the cell.

There is no way to configure Excel to do this, but it is very easy task to create a macro that will enter the adjusted time. If you know that your local time is 8 hours behind GMT, then you can use a macro such as the following:

Sub EnterGMT()
    ActiveCell = Time + (8 / 24)
End Sub

You can then assign the macro to a shortcut key and use it to enter the time in any cell. If your local time is actually 7 hours behind GMT, then simply change the 8 to a 7 in the formula.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13084) applies to Microsoft Excel 2007, 2010, and 2013.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Saving Changes when Closing

If you write a macro that makes changes to a document, you may want that macro to save those changes. There are several ...

Discover More

Unwanted Data Changes

The AutoCorrect feature in Excel can change some of your data in ways you don't like. If you discover this is happening, ...

Discover More

Putting an X in a Clicked Cell

Need to click on a cell and have it replaced with an "X"? Macros make it easy to do, as illustrated in this tip.

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Converting Numeric Values to Times

If you have a bunch of times entered into cells without the colon between the hours and minutes, chances are good that ...

Discover More

Counting Times within a Range

Excel allows you to easily store dates and times in your worksheets. If you have a range of cells that contain times and ...

Discover More

Automatically Converting to GMT

You know what time it is, right? (Quick; look at your watch!) What if you want to know what time it is in Greenwich, ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four more than 2?

2016-11-21 03:27:04

John

Reply to Emile: I think I can see where you're struggling:
If you want to convert from GMT to YOUR time, you should indeed subtract (x/24).
However, the formula is to convert YOUR time to GMT, so you need to ADD.


2016-11-20 17:35:18

Thomson

Late reply to Ray_Excel

you can use the below formula if you have the date value in A1 and time value in A2

=A1-DATE(YEAR(A1),1,1)&TEXT(A2,"hhmm")


2016-11-18 07:37:39

Emile

GMT is "ahead" of NY.

This means that NY is behind of GMT.

This means that living "behind" means it is earlier at your adress than there where it is "ahead".

This means that if you live "behind" of GMT, you should subtract (8/24) in stead of add.


I must admit though, i didnt actually created a rocket, so there might be a pittfall what i dont see yet, but something in my head is crooked on this tip ☺

I do like all your tips a lot, so dont take it as an offence, im just struggeling in my head.


2014-04-29 06:57:10

Bryan

Ray: your question is ambiguous. What do you specifically need to do? Go to the site nir liberman linked and I bet you can find your answer.


2014-04-28 09:22:51

Rkeev

Without a Macro version--
If in cell C3 you hit the Ctrl Shift ; it will place the time in it just place "=C3-(8/24)" and it will work without a macro


2014-04-27 17:23:52

RAY-EXCEL

I need a formula or macro to combine a JULIAN day and the local military time (Z)ulu time.

Today is April 27 (Julian day 117)
Local military time (Zulu) is 5:15, this
equals 2115.

Combined they equal 1172115

Thanks.


2014-04-27 01:59:28

nir liberman

charles s:
http://lmgtfy.com/?q=excel+vba+get+timezone&l=1


2014-04-26 08:21:52

Charles S

Nice tip -clear & crisp..." to improve its overall value address how to get your local GMT and how to execute the EnterGMT macro .


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.