Link to home
Start Free TrialLog in
Avatar of jjrr007
jjrr007

asked on

IIF statement and add hours in Excel

I have an Excel Worksheet (2003 Excel Version) that has time in one columns.  I want to write a formula that says, if you add 4 hours to the time and the

Result is Less than 5PM-   Return 5PM
Result is between 5 PM and 9PM- Return 9PM
Result is after 9PM- Return 11:59:59PM

I have the part of the formula to add 4 hours it's: =(D2+TIME(4,0,0))   .  I am not sure how to come up with the iif statement.  
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial