Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Time Calculation
Can somebody help please.
I am trying to enter this formula but something does not seem to work. Cell C2 containes a time data in the format HH:MM:SS i am trying to enter in cell D2 the following formula: =IF(C2=03:30:00,"ABC",(C2=04:30:00,"DEF",(C2=05:30 :00,"GHI","FL"))) This does not seem to work with time, though it does work with general numbers. Thanks in advance |
#2
|
|||
|
|||
=IF(C2=TIME(3,30,0),"ABC",(IF(C2=TIME(4,30,0),"DEF ",(IF(C2=TIME(5,30,0),"GHI","FL")))))
If C2 is the result of a calculation, be aware that if it is off only 1/100000 of a second, your comparisons will not evaluate to TRUE -- Kind Regards, Niek Otten Microsoft MVP - Excel "Issam LAdki" wrote in message ... Can somebody help please. I am trying to enter this formula but something does not seem to work. Cell C2 containes a time data in the format HH:MM:SS i am trying to enter in cell D2 the following formula: =IF(C2=03:30:00,"ABC",(C2=04:30:00,"DEF",(C2=05:30 :00,"GHI","FL"))) This does not seem to work with time, though it does work with general numbers. Thanks in advance |
#3
|
|||
|
|||
Hi!
Try this: =IF(C2=TIME(3,30,0),"ABC",IF(C2=TIME(4,30,0),"DEF" ,IF (C2=TIME(5,30,0),"GHI","FL"))) If C2 is any other value but 3:30, 4:30 or 5:30, the formula will return FL. That also means if cell C2 is empty. Are you sure that's what you really want? If C2 is empty you more than likely don't want FL to be returned, so: =IF(C2="","",IF(C2=TIME(3,30,0),"ABC",IF(C2=TIME (4,30,0),"DEF",IF(C2=TIME(5,30,0),"GHI","FL")))) If you have a whole bunch of these it may be better to use a lookup. Biff -----Original Message----- Can somebody help please. I am trying to enter this formula but something does not seem to work. Cell C2 containes a time data in the format HH:MM:SS i am trying to enter in cell D2 the following formula: =IF(C2=03:30:00,"ABC",(C2=04:30:00,"DEF", (C2=05:30:00,"GHI","FL"))) This does not seem to work with time, though it does work with general numbers. Thanks in advance . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Time Calculation | Excel Worksheet Functions | |||
elapsed time calculation | Excel Discussion (Misc queries) | |||
Time calculation. | Excel Worksheet Functions | |||
"Manual calculation" takes less time. Why? | Excel Discussion (Misc queries) | |||
time calculation excel | Excel Worksheet Functions |