View Single Post
 
Old 02-26-2011, 12:15 PM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi Karl,

In Excel, a day (or 24 hours) is 1.
Therefore an hour is 1/24, a minute is 1/24/60, etc..

In your formula:
Code:
=C2+5
You are adding 5 days to C2. Since the format is h:mm AM/PM, it looks like the formula does nothing because the day portion is not displayed.

So if you wanted to add five hours you would use
Code:
=C2+(5/24)
What would be even better would be to have a cell which you put the required hour adjustment into. Say this is cell E1. Your formula then becomes:
Code:
=C2+(E1/24)
Any other formulas which need the hour adjustment could also reference E1. This means that if you ever wanted to change the hour adjustment you could simply change the hours in E1.
__________________
Colin

RAD Excel Blog
Reply With Quote