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

Wrong Suggested Date

When you start to type a date into a document, Word helpfully suggests a full date that you can accept. The result is ...

Discover More

Counting the Times a Worksheet is Used

Do you need to know how many times a worksheet has been used? Excel doesn't track that information, but you can develop ...

Discover More

Controlling Entry Order on Unprotected Cells

When you protect a worksheet, one of the benefits is that you can limit which cells can be used for data entry. How a ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Entering or Importing Times without Colons

Enter a time into a cell and you normally include a colon between the hours and minutes. If you want to skip that pesky ...

Discover More

Calculating Elapsed Time with Excluded Periods

When using Excel to calculate elapsed time, there can be all sorts of criteria that affect the formulas you would ...

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 9 - 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.