How do I get 24 hrs added date & time value from cell value which has date & time for eg: 2/28/2011 12:45 AM?

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
How do I get 24 hrs added date & time value from cell value which has date & time for eg: 2/28/2011 12:45 AM?

Thanks for helping
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Maybe I am missing something, but don't you just want to add 1 to it?
Excel Workbook
BC
222/28/11 12:45 AM3/1/11 12:45 AM
Sheet1
Cell Formulas
RangeFormula
C22=B22+1

Hope that helps.
 
Upvote 0
doesn't this work?
<TABLE style="WIDTH: 225pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=299 border=0><COLGROUP><COL style="WIDTH: 71pt; mso-width-source: userset; mso-width-alt: 3437" span=2 width=94><COL style="WIDTH: 83pt; mso-width-source: userset; mso-width-alt: 4059" width=111><TBODY><TR style="HEIGHT: 13.5pt" height=18><TD class=xl63 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; WIDTH: 71pt; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent" align=right width=94 height=18>3/1/2011 13:37</TD><TD class=xl64 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: windowtext; WIDTH: 71pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent" align=right width=94>3/2/2011 13:37</TD><TD class=xl65 style="BORDER-RIGHT: windowtext 1pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: windowtext; WIDTH: 83pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent" width=111>B2 formula: =A1+1</TD></TR></TBODY></TABLE>
 
Upvote 0
:)Range("A1") has time file got modified, I want to run my code if modified date & time is greter then 24hrs
That seems to work but please help more.:)
 
Upvote 0
If you are trying to use this in code to check if at least 24 houts has passed before the macro can be run again, maybe this is what you want?

Code:
if now-1>range("a1").Value then
'do code
end if
Hope that helps.
 
Upvote 0
:)Range("A1") has time file got modified, I want to run my code if modified date & time is greter then 24hrs
That seems to work but please help more.:)

you can format the cell. Right click ---->format cell----> under number tab select your time format. :) HTH

Cheers
Amit
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,293
Members
452,902
Latest member
Knuddeluff

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