#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default combine or if

I need to check for three (or more conditions) and need a different value
returned for each criteria.

For example:
DATA Wanted result:
1 Single
2 Dual
4 Quad

My mistake lies in formatting of the formula:
If(A1=1, "Single")or if(A1=2, "Dual") or if (A1=4, "Quad")


-aimes
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default combine or if

You can use

=VLOOKUP(A1,{1,"Single";2,"Dual";3,"Quad"},2,0)

which is handy especially if you use more than 3, or

=CHOOSE(A1,"Single","Dual","Quad")


if you insist using IF


=IF(A1=1,"Single",IF(A1=2,"Dual","Quad"))

assuiming thatn there cannot be any other values than 1,2,3

--


Regards,


Peo Sjoblom

"littlelouise1" wrote in message
...
I need to check for three (or more conditions) and need a different value
returned for each criteria.

For example:
DATA Wanted result:
1 Single
2 Dual
4 Quad

My mistake lies in formatting of the formula:
If(A1=1, "Single")or if(A1=2, "Dual") or if (A1=4, "Quad")


-aimes



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 209
Default combine or if

=IF(A1=1, "Single",IF(A1=2, "Dual",IF(A1=4, "Quad","")))
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"littlelouise1" wrote:

I need to check for three (or more conditions) and need a different value
returned for each criteria.

For example:
DATA Wanted result:
1 Single
2 Dual
4 Quad

My mistake lies in formatting of the formula:
If(A1=1, "Single")or if(A1=2, "Dual") or if (A1=4, "Quad")


-aimes

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default combine or if

You need to construct your formula like this:

=IF(A1=1,"Single",IF(A1=2,"Dual",IF(A1=4,"Quad","n one")))

Will return the message "none" if A1 does not contain 1, 2 or 4.

You can combine IF functions like this (referred to as nesting) up to
a maximum of 7 if you have XL2003 or earlier. An alternative way if
you have more than 7 criteria is to use VLOOKUP, or you could use
CHOOSE if your numbers are consecutive.

Hope this helps.

Pete

On Jul 7, 6:28*pm, littlelouise1
wrote:
I need to check for three (or more conditions) and need a different value
returned for each criteria.

For example:
DATA * * * Wanted result:
1 * * * * * * Single
2 * * * * * * Dual
4 * * * * * * Quad

My mistake lies in formatting of the formula:
If(A1=1, "Single")or if(A1=2, "Dual") or if (A1=4, "Quad")

-aimes


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default combine or if

I'd create a table on another sheet that's dedicated to just that info.

Then I'd use:

=vlookup(a1,Type!a:b,2,false)

where that table was in A1:B### on a sheet named Type.

If I have to add more entries--or even change some, I find this easier to
update.


littlelouise1 wrote:

I need to check for three (or more conditions) and need a different value
returned for each criteria.

For example:
DATA Wanted result:
1 Single
2 Dual
4 Quad

My mistake lies in formatting of the formula:
If(A1=1, "Single")or if(A1=2, "Dual") or if (A1=4, "Quad")

-aimes


--

Dave Peterson
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 to combine........ pathan Excel Discussion (Misc queries) 1 August 7th 06 09:39 AM
How Can i combine Monty Excel Discussion (Misc queries) 5 July 25th 06 09:28 PM
Combine into one please Steved Excel Worksheet Functions 1 August 26th 05 02:04 AM
How do I combine IF and OR? ana_15825 - ExcelForums.com Excel Worksheet Functions 6 June 30th 05 04:51 AM
Combine into one please. Steved Excel Worksheet Functions 2 February 22nd 05 11:46 PM


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