IF statement to Display word on Time

  • Thread starter Thread starter Lester Mosley
  • Start date Start date
L

Lester Mosley

I am tyring this:

=IF(D4>0:00:01,"Word 1",IF(D4>0:01:00,"Word 2",IF(D4>0:05:00,"Word
3","")))
When the user puts in a time in Cell D4 - I want it to display in D5

I get errrors on this time.. How would I go about this?

Appreciate any help
 
You have a logic problem. If the first IF is true, then the other IFs will
not be tested.

If the first IF is false, then so will the others be false
 
several issues: one is order the other is value
as written the first if would be true if any of the others were met and
would always result in word 1
if D4 is time, its comparison needs to be in a serialized time value
try
=if(D4>time(0,5,0),"word 3",if
D4>time(0,1,0),"word2",if(D4>time(0,0,1),"Word1")))
 
There are several errors, first the times are not seen as times you can
replace them with TIME(,,1) for one second for instance and 1 minute with
TIME(,1,)
The formula construction is also erroneous since the first condition will
block all the other as well

=IF(D4>TIME(,5,),"Word 3",IF(D4>TIME(,1,),"Word 2",IF(D4>TIME(,,1),"Word
1","")))


or

=IF(AND(D4<=TIME(,1,),D4>TIME(,,1)),"Word
1",IF(AND(D4<=TIME(,5,),D4>=TIME(,1,)),"Word 2",IF(D4>TIME(,5,),"Word
3","")))


or

=VLOOKUP(D4,{0.0000231481481481481,"Word 1";0.000706018518518518,"Word
2";0.0034837962962963,"Word 3"},2)


--


Regards,


Peo Sjoblom
 
I believe you'll also may need to use the TIMEVALUE function (e.g. replace
0:00:01 with TIMEVALUE("0:00:01"))
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top