Date & Time (add a day)

indy1982

New Member
Joined
Jan 2, 2008
Messages
29
Hi All,:)

I have the following date & time in a cell "01/07/2010 15:23"

If the time is greater than 12:00 I want the date to change to "02/07/2010 00:00" or just have "02/07/2010" show in another cell.

The cell format is set at general at the moment.

Is their an easy way a can do this please?

Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

=IF(MOD(A1,1)>0.5,INT(A1+1),INT(A1))

and format as Date.
 

indy1982

New Member
Joined
Jan 2, 2008
Messages
29
Just one other very quick query if the time is bang on "01/07/2010 12:00" is it possible to add a day.

At the moment only changes to "02/07/2010" if the time is set at "01/07/2010 12:01"

Thankyou:)
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650

ADVERTISEMENT

Yep :)

=IF(MOD(A1,1)>=0.5,INT(A1+1),INT(A1))
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Actually I have over-complicated this :oops:

=ROUND(A1,0)
 

Watch MrExcel Video

Forum statistics

Threads
1,129,589
Messages
5,637,278
Members
416,963
Latest member
samfuge

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