ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I add a numeric value to a TIME cell? (https://www.excelbanter.com/excel-worksheet-functions/5271-how-can-i-add-numeric-value-time-cell.html)

david

How can I add a numeric value to a TIME cell?
 
need to create a spreadsheet with greenwich mean and Tokyo time

Bob Phillips

=A1+B1/24

where A1 holds London time, and B1 is the hours difference

--

HTH

RP

"david" wrote in message
...
need to create a spreadsheet with greenwich mean and Tokyo time




George Nicholson

In Date/Time terms, 1 = 1 day. Therefo1 hour = 1/24.

So, time in a zone x time zones "ahead":
= Now() + (x / 24)

or, using VBA in code:
= DateAdd("h", x, Now())

or, using Excel formulas in a cell:
= Time(Hour(Now()) + x, Minute(Now()), Second(Now()))

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"david" wrote in message
...
need to create a spreadsheet with greenwich mean and Tokyo time





All times are GMT +1. The time now is 01:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com