Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default Multiple IF THEN criteria...

=IF(B20="r","-2",IF(B20="5","-1",IF(B20="=","1","")))

The "5" displays blank, all the others work... any reason why?

I am trying to be get so if in B20 someone enter's r "-2" diplays; 5 "-1"
diplays; = "-2" diplays; and if they enter nothing then nothing displays.

thank you!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default Multiple IF THEN criteria...

"Jason" wrote:
=IF(B20="r","-2",IF(B20="5","-1",IF(B20="=","1","")))
The "5" displays blank, all the others work


Perhaps B20 contains the __number__ 5, not the __text__ "5". If so, you
should write:

=IF(B20="r","-2",IF(B20=5,"-1",IF(B20="=","1","")))

But I wonder if you want the __numbers__ -2, -1 and 1, not text. If so, you
should write:

=IF(B20="r",-2,IF(B20=5,-1,IF(B20="=",1,"")))


----- original message -----

"Jason" wrote:
=IF(B20="r","-2",IF(B20="5","-1",IF(B20="=","1","")))

The "5" displays blank, all the others work... any reason why?

I am trying to be get so if in B20 someone enter's r "-2" diplays; 5 "-1"
diplays; = "-2" diplays; and if they enter nothing then nothing displays.

thank you!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default Multiple IF THEN criteria...

That was it! good catch and thanks!

"Joe User" wrote:

"Jason" wrote:
=IF(B20="r","-2",IF(B20="5","-1",IF(B20="=","1","")))
The "5" displays blank, all the others work


Perhaps B20 contains the __number__ 5, not the __text__ "5". If so, you
should write:

=IF(B20="r","-2",IF(B20=5,"-1",IF(B20="=","1","")))

But I wonder if you want the __numbers__ -2, -1 and 1, not text. If so, you
should write:

=IF(B20="r",-2,IF(B20=5,-1,IF(B20="=",1,"")))


----- original message -----

"Jason" wrote:
=IF(B20="r","-2",IF(B20="5","-1",IF(B20="=","1","")))

The "5" displays blank, all the others work... any reason why?

I am trying to be get so if in B20 someone enter's r "-2" diplays; 5 "-1"
diplays; = "-2" diplays; and if they enter nothing then nothing displays.

thank you!

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
Count multiple cells against multiple criteria in an Excel spreads EricB Excel Worksheet Functions 7 June 3rd 08 09:09 PM
match multiple criteria ina range from multiple criteria multiplet RG Excel Worksheet Functions 8 September 28th 07 04:21 AM
Index & Match functions - multiple criteria and multiple results [email protected] Excel Worksheet Functions 4 May 2nd 07 03:13 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Saleem Excel Worksheet Functions 1 January 12th 05 10:54 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Arain Excel Worksheet Functions 1 January 12th 05 08:33 AM


All times are GMT +1. The time now is 03:44 PM.

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

About Us

"It's about Microsoft Excel"