Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Subtracting time
Hello, Can someone kindly help me with this trouble.
I have a few columns formatted as h:mm. Start Time = A2 End Time = B2 Result = C2 I want to subtract A2 from B2 (B2 - A2) and show the difference in C2. I then want to say if C2 = 0:00 then display "Full". If C2 0:00 then display "Available". If C2 < 0:00 the display "Overbooked" Although I do see 0:00 in the result column (C2), the logic does not work I would greatly appreciate any help on this. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Subtracting time
Try this:
=IF(C2=0,"Full",IF(C20,"Available","Overbooked")) Hope this helps. Pete On Apr 21, 10:15*pm, Eliott wrote: Hello, Can someone kindly help me with this trouble. I have a few columns formatted as h:mm. * Start Time = A2 End Time = B2 Result = C2 I want to subtract A2 from B2 (B2 - A2) and show the difference in C2. I then want to say if C2 = 0:00 then display "Full". If C2 0:00 then display "Available". If C2 < 0:00 the display "Overbooked" Although I do see 0:00 in the result column (C2), the logic does not work I would greatly appreciate any help on this. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Subtracting time
Your problem is that a display of 0:00 is rounded to the minute, but the If
statement is not rounding, so if you have a difference of less than 30 seconds, it's not zero to Excel. Change C2 to: =mround(b2-a2,1/60/24) Regards, Fred. "Eliott" wrote in message ... Hello, Can someone kindly help me with this trouble. I have a few columns formatted as h:mm. Start Time = A2 End Time = B2 Result = C2 I want to subtract A2 from B2 (B2 - A2) and show the difference in C2. I then want to say if C2 = 0:00 then display "Full". If C2 0:00 then display "Available". If C2 < 0:00 the display "Overbooked" Although I do see 0:00 in the result column (C2), the logic does not work I would greatly appreciate any help on this. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Subtracting time
Try:
=IF(COUNT(A2:B2)<2,"",IF(B2-A2<0,"Overbooked",IF(B2-A20,"Available","Full"))) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Eliott" wrote: Hello, Can someone kindly help me with this trouble. I have a few columns formatted as h:mm. Start Time = A2 End Time = B2 Result = C2 I want to subtract A2 from B2 (B2 - A2) and show the difference in C2. I then want to say if C2 = 0:00 then display "Full". If C2 0:00 then display "Available". If C2 < 0:00 the display "Overbooked" Although I do see 0:00 in the result column (C2), the logic does not work I would greatly appreciate any help on this. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Subtracting time
Have you tried changing the format of C2 from time to a number?
"Eliott" wrote: Hello, Can someone kindly help me with this trouble. I have a few columns formatted as h:mm. Start Time = A2 End Time = B2 Result = C2 I want to subtract A2 from B2 (B2 - A2) and show the difference in C2. I then want to say if C2 = 0:00 then display "Full". If C2 0:00 then display "Available". If C2 < 0:00 the display "Overbooked" Although I do see 0:00 in the result column (C2), the logic does not work I would greatly appreciate any help on this. |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Subtracting time
Thank you all. I'll try and let you know.
"Fred Smith" wrote: Your problem is that a display of 0:00 is rounded to the minute, but the If statement is not rounding, so if you have a difference of less than 30 seconds, it's not zero to Excel. Change C2 to: =mround(b2-a2,1/60/24) Regards, Fred. "Eliott" wrote in message ... Hello, Can someone kindly help me with this trouble. I have a few columns formatted as h:mm. Start Time = A2 End Time = B2 Result = C2 I want to subtract A2 from B2 (B2 - A2) and show the difference in C2. I then want to say if C2 = 0:00 then display "Full". If C2 0:00 then display "Available". If C2 < 0:00 the display "Overbooked" Although I do see 0:00 in the result column (C2), the logic does not work I would greatly appreciate any help on this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Subtracting Dates to get total time work time excluding weekends | Excel Discussion (Misc queries) | |||
subtracting time | Excel Worksheet Functions | |||
subtracting time | Excel Worksheet Functions | |||
Subtracting Time | Excel Discussion (Misc queries) | |||
Subtracting Time | Excel Worksheet Functions |