Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
Is there a quick way to do multiple if statements rather than using an embedded if statement? I have the following: If A1 = 1 then write carpet, If A1 = 2 then write couch, If A1 = 3 then write table and so on. Is there an easier way? Ellen |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The easier way is to use a lookup, the most common being the Vlookup
function. Regards, Fred "ellebelle" wrote in message ... Hello, Is there a quick way to do multiple if statements rather than using an embedded if statement? I have the following: If A1 = 1 then write carpet, If A1 = 2 then write couch, If A1 = 3 then write table and so on. Is there an easier way? Ellen |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Wed, 30 Jan 2008 04:56:00 -0800, ellebelle
wrote: Hello, Is there a quick way to do multiple if statements rather than using an embedded if statement? I have the following: If A1 = 1 then write carpet, If A1 = 2 then write couch, If A1 = 3 then write table and so on. Is there an easier way? Ellen =choose(a1,"carpet","couch","table") or =INDEX(E1:E3,A1) Where E1: carpet E2: couch E3: table If your A1 values are not sequential, you could use VLOOKUP --ron |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If you have several items, then you could do it this way:
=CHOOSE(A1,"carpet","couch","table","and so on") The drawback is that you have to amend the formula if you want to add/ delete/amend items. Alternatively, you could set up a table somewhere like this (eg in X1:Y3): 1 carpet 2 couch 3 table and then use: =VLOOKUP(A1,X1:Y10,2,0) Here you can add items to the table without amending the formula (although the range will have to cover the the extent of the table). Hope this helps. Pete On Jan 30, 12:56*pm, ellebelle wrote: Hello, Is there a quick way to do multiple if statements rather than using an embedded if statement? I have the following: If A1 = 1 then write carpet, If A1 = 2 then write couch, If A1 = 3 then write table and so on. Is there an easier way? Ellen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I avoid getting this: © in spreadsheet when I want this (c | Excel Discussion (Misc queries) | |||
IF Statements (Mutliple Statements) | Excel Worksheet Functions | |||
How to avoid #DIV/0 from appearing | Excel Discussion (Misc queries) | |||
reducing the number of times an IF statement needs to be calculated in embedded IF statements | Excel Discussion (Misc queries) | |||
what is this, how do I avoid it? | Excel Discussion (Misc queries) |