#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mmm1106
 
Posts: n/a
Default Help with IF


can anyone tell me why this formula works
=IF(AND(G7<(TODAY()-15),I7=TRUE),"OK","contract required")

but this one doesn't

=IF(AND(G7<(TODAY()-15),I7=yes),"OK","contract required")

it's driving me mad...

thanks!

Mel x


--
mmm1106
------------------------------------------------------------------------
mmm1106's Profile: http://www.excelforum.com/member.php...o&userid=35786
View this thread: http://www.excelforum.com/showthread...hreadid=555505

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph
 
Posts: n/a
Default Help with IF

"mmm1106" wrote in
message ...

can anyone tell me why this formula works
=IF(AND(G7<(TODAY()-15),I7=TRUE),"OK","contract required")

but this one doesn't

=IF(AND(G7<(TODAY()-15),I7=yes),"OK","contract required")

it's driving me mad...


Because unless you have defined yes as a name, Excel doesn't recognise it.
If you want to look for yes as a text string, you need to put it in double
quotes, just as you've done with the strings "OK" and "contract required".
By contrast, TRUE is a logical value which Excel recognises.
--
David Biddulph


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Help with IF

Maybe the 2nd formula should read as:
=IF(AND(G7<(TODAY()-15),I7="yes"),"OK","contract required")

i.e. I7="yes" instead of just: I7=yes
(Without the double quotes, yes would be interp'd as a defined name)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


"mmm1106" wrote:


can anyone tell me why this formula works
=IF(AND(G7<(TODAY()-15),I7=TRUE),"OK","contract required")

but this one doesn't

=IF(AND(G7<(TODAY()-15),I7=yes),"OK","contract required")

it's driving me mad...

thanks!

Mel x


--
mmm1106
------------------------------------------------------------------------
mmm1106's Profile: http://www.excelforum.com/member.php...o&userid=35786
View this thread: http://www.excelforum.com/showthread...hreadid=555505


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mmm1106
 
Posts: n/a
Default Help with IF


thanks max - it worked!!


--
mmm1106
------------------------------------------------------------------------
mmm1106's Profile: http://www.excelforum.com/member.php...o&userid=35786
View this thread: http://www.excelforum.com/showthread...hreadid=555505

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Help with IF

Glad to hear that (from us <g) !
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"mmm1106" wrote:

thanks max - it worked!!

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



All times are GMT +1. The time now is 04:11 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"