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

Deleting Cells

You can modify the structure of a table by deleting cells. This tip shows just how easy it is to delete one (or more) cells ...

Discover More

Understanding Operators

At the heart of working with Excel is the process of creating formulas that calculate results based on information within a ...

Discover More

Declaring Variables

Macros depend on the use of variables to do their work. This tip examines how variables are declared in a macro, using the ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Rounding Time

Need to round the time in a cell to a certain value? There are a couple of ways you can do this with a formula.

Discover More

Working with Elapsed Time

Work with times in a worksheet and you will eventually want to start working with elapsed times. Here's an explanation of ...

Discover More

Displaying a Result as Minutes and Seconds

When you use a formula to come up with a result that you want displayed as a time, it can be tricky figuring out how to get ...

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 8 - 3?

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.