Add 1 hour to Timestamp with if statement

asolopreneur

New Member
Joined
Nov 15, 2017
Messages
40
Platform
  1. Windows
I want to add 7 hours to timestamp if time is 01:00:00AM and add 1 hour if it's not 01:00:00AM.

I tried - if(A2=TIMEVALUE("01:00:00AM"),A2+TIME(7,0,0),A2+TIME(1,0,0)) A2 = <style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>08/Jan/19 8:0:0AM

1 hour is getting added but it's not adding 7 hours if there is "01:00:00AM".

Here is my Google Sheet - https://docs.google.com/spreadsheets/d/1DkmsjUQXAurZfIxLbEq7nCaL07ubouxzjFFKFyrf0f0/

Thanks in advance
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
It's working, awesome.

Thanks for taking time and helping me out. Could you please tell me how it works in brief?

Thanks again, cheers!
 
Upvote 0

Forum statistics

Threads
1,214,669
Messages
6,120,828
Members
448,990
Latest member
rohitsomani

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top