Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to combine........ | Excel Discussion (Misc queries) | |||
How Can i combine | Excel Discussion (Misc queries) | |||
Combine into one please | Excel Worksheet Functions | |||
How do I combine IF and OR? | Excel Worksheet Functions | |||
Combine into one please. | Excel Worksheet Functions |