Link to home
Start Free TrialLog in
Avatar of Jagwarman
Jagwarman

asked on

Help with formula

if I have a time in cell P4 like 12:00 and a date and time in cell T4 like 31/07/2015 12:15

what would be the formula to say

If T4 [Time] is less than P4, Yes, No

I thought maybe something like

=IF(RIGHT(T4,5)<=P4,"Yes","No")
ASKER CERTIFIED SOLUTION
Avatar of Rob Henson
Rob Henson
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
Date and time are recognised in Excel as a serial number. For example 31/07/15 12:15 as a number would be 42216.51  the 42216 being the serial number for the date 31/07/15 and .51 being the portion of a day, ie the decimal portion of the integer.

MOD function divides the number by a factor and gives the remainder, so dividing by one gives you the decimal remainder.

Thanks
Rob H
Avatar of Jagwarman
Jagwarman

ASKER

thanks Rob, I somehow knew you would know the answer to that one.