Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default IF statement to Display word on Time

I am tyring this:

=IF(D40:00:01,"Word 1",IF(D40:01:00,"Word 2",IF(D40: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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default IF statement to Display word on Time

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
--
Gary''s Student - gsnu2007


"Lester Mosley" wrote:

I am tyring this:

=IF(D40:00:01,"Word 1",IF(D40:01:00,"Word 2",IF(D40: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


  #3   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default IF statement to Display word on Time

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(D4time(0,5,0),"word 3",if
D4time(0,1,0),"word2",if(D4time(0,0,1),"Word1")) )

"Lester Mosley" wrote:

I am tyring this:

=IF(D40:00:01,"Word 1",IF(D40:01:00,"Word 2",IF(D40: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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default IF statement to Display word on Time

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(D4TIME(,5,),"Word 3",IF(D4TIME(,1,),"Word 2",IF(D4TIME(,,1),"Word
1","")))


or

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


or

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


--


Regards,


Peo Sjoblom





"Lester Mosley" wrote in message
ps.com...
I am tyring this:

=IF(D40:00:01,"Word 1",IF(D40:01:00,"Word 2",IF(D40: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



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 173
Default IF statement to Display word on Time

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

"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu2007


"Lester Mosley" wrote:

I am tyring this:

=IF(D40:00:01,"Word 1",IF(D40:01:00,"Word 2",IF(D40: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


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
How do you display IF statement results in a different cell Neall Excel Worksheet Functions 3 June 23rd 07 10:39 PM
How do you display IF statement results in a different cell Neall Excel Worksheet Functions 7 June 22nd 07 08:53 PM
IF statement to calculate time usage in specific time bands Daren Excel Worksheet Functions 6 January 31st 07 01:34 PM
If statement where the logical test is a range that equals a word Steve o Excel Worksheet Functions 8 June 27th 05 02:43 PM
How can I create an IF statement in Excel that uses the word "con. BobbiCisse Excel Worksheet Functions 3 March 22nd 05 06:45 AM


All times are GMT +1. The time now is 02:53 PM.

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"