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.

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

Floating Menus

Some of the secondary menus used in Word can be made into floating toolbars, if you know the trick. It's not that hard; ...

Discover More

Setting Default Print Margins

Don't like the print margins that Excel uses by default? You can change the default by changing the workbook on which ...

Discover More

Changing Text Case

Word provides a built-in shortcut to change the case of a text selection. Understanding how that shortcut works (and the ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Dealing with Large Numbers of Seconds

When adding values to a time to calculate a new time, you may naturally choose to use the TIME function. This can cause ...

Discover More

Using Excel for Timing

Excel allows you to store times in a worksheet. If you want to use Excel to time certain events, there are a couple of ...

Discover More

Taking the Time into Account in a Formula

Need to check the current time in a formula you are putting together? It can sometimes be tricky to remember what Excel ...

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 three more than 8?

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.