Add 1 hour to Timestamp with if statement

asolopreneur

New Member
Joined
Nov 15, 2017
Messages
27
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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

asolopreneur

New Member
Joined
Nov 15, 2017
Messages
27
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!
 

Forum statistics

Threads
1,136,322
Messages
5,675,077
Members
419,549
Latest member
EliteBeat

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
Top