Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Issam LAdki
 
Posts: n/a
Default 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   Report Post  
Niek Otten
 
Posts: n/a
Default

=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   Report Post  
Biff
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Calculation chintu49 Excel Worksheet Functions 2 February 16th 05 02:55 PM
elapsed time calculation rwf Excel Discussion (Misc queries) 1 January 21st 05 04:51 AM
Time calculation. shital shah Excel Worksheet Functions 2 January 20th 05 11:25 AM
"Manual calculation" takes less time. Why? Kjetil Excel Discussion (Misc queries) 1 January 7th 05 12:28 AM
time calculation excel Gate Keeper Excel Worksheet Functions 1 December 31st 04 08:27 AM


All times are GMT +1. The time now is 04:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"