Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 56
Default multiple if statment

How can I make an IF formula return a specific value when a specific cell has
an "x" in it.

Specifically,

- I have 5 columns set to have user enter an "x" in. Columns N, O, P, Q,
and R.
- I have 1 column on the end to insert formula in. This is column W.

If user puts an "x" in cell N3 then W3 will return a 1.
If user puts an "x" in cell O3 then W3 will return a 2.
If user puts an "x" in cell P3 then W3 will return a 3 and so on.

Right now I have this formula which returns a #VALUE error.

=IF(N3="x","1",""),IF(O3="x","2",""),IF(P3="x","3" ,""),IF(Q3="x","4",""),IF(R3="x","5","")

Thank you very much,

--
Thank You!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 213
Default multiple if statment

How can I make an IF formula return a specific value when a specific
cell has an "x" in it.

Specifically,

- I have 5 columns set to have user enter an "x" in. Columns N, O,
P, Q,
and R.
- I have 1 column on the end to insert formula in. This is column W.

If user puts an "x" in cell N3 then W3 will return a 1.
If user puts an "x" in cell O3 then W3 will return a 2.
If user puts an "x" in cell P3 then W3 will return a 3 and so on.


Using IF, one way is:
=IF(N3="x",1,IF(O3="x",2,IF(P3="x",3,IF(Q3="x",4,I F(R3="x",5,"")))))

But I'd take a different approach, something more like:
=IF(ISNA(MATCH("x",N3:R3,0)),"",MATCH("x",N3:R3,0) )
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 56
Default multiple if statment

Thank you so much MVOS, your formula worked like a charm.
--
Thank You!


"MyVeryOwnSelf" wrote:

How can I make an IF formula return a specific value when a specific
cell has an "x" in it.

Specifically,

- I have 5 columns set to have user enter an "x" in. Columns N, O,
P, Q,
and R.
- I have 1 column on the end to insert formula in. This is column W.

If user puts an "x" in cell N3 then W3 will return a 1.
If user puts an "x" in cell O3 then W3 will return a 2.
If user puts an "x" in cell P3 then W3 will return a 3 and so on.


Using IF, one way is:
=IF(N3="x",1,IF(O3="x",2,IF(P3="x",3,IF(Q3="x",4,I F(R3="x",5,"")))))

But I'd take a different approach, something more like:
=IF(ISNA(MATCH("x",N3:R3,0)),"",MATCH("x",N3:R3,0) )

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
if statment Dreamstar_1961 Excel Worksheet Functions 5 April 17th 07 01:30 PM
If statment if its possible. atb Excel Discussion (Misc queries) 2 October 17th 06 05:50 PM
IF Statment across Multiple Sheets jdeer0618 Excel Worksheet Functions 1 May 18th 06 11:20 AM
Multiple IF THEN ELSE statment Mark G Excel Worksheet Functions 5 March 18th 05 08:51 PM
If statment helpdesk genie Excel Worksheet Functions 2 January 12th 05 03:23 AM


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