Hi All,
I am trying to use If condition to find which one is the max time however i am not able to do it.Below is the example
"Login Time
IST" Actual Login Time Discrepancy
23:45 23:53
18:15 18:35
18:15 18:13
19:15 19:14
18:15 18:15
In discrepancy i need to check if actual login time is more time than login time IST then it should subtract actual login time from login time IST or else it should display login time IST .
Note: Actual Login Time is in Time format.
Last edited by anto1510; 12-05-2010 at 05:48 AM.
What happens when the times cross midnight - eg "IST" 23:55 and "Actual" 0:30 ?
I suspect you will need to build in some logic to differentiate the above from the likes of example 3, ie:
in the above we calculate the time difference where either Actual exceeds IST or where the hour differences would imply a midnight cross overC2: =IF(OR($B2>$A2,(HOUR($A2)-HOUR($B2))>12),MOD($B2-$A2,1),$A2) copied down format as Time
(in the latter case the Actual Time precedes the IST Time despite being "greater" in reality)
Last edited by DonkeyOte; 12-05-2010 at 04:20 AM. Reason: revised FALSE from 0 to $A2 given IST requirement
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
What if the actual login time is in date and time format (12/2/2010 8:00) ?
If that's the case it's simply
Dates and Times in Excel are just numbers.C2: =IF($B2>$A2,$B2-$A2,$A2)
Dates being Serial Numbers and Time being decimal (1 equating to 24 hours)
It is the Date Format applied to those Numbers that generates the Date "strings" as you see them - if you format as General you will see the underlying numeric.
Last edited by DonkeyOte; 12-05-2010 at 04:57 AM. Reason: reworded
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
what i actually meant is explained with below example
"Login Time
IST" Actual Login Time
23:45 12/2/10 11:53 PM
your forluma is not working with the above example
okay i got it.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks