Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If statement
In cell H4 I want one of three model numbers to appear. Each model number is
assigned a value, so 1112111 will equal HRV019SB1. So the formula for H4 is, as of now, =IF(H4=1112111,"HRV019SB1"). And that works great if 1112111 appears. How do I write the formula for multiple values, so if 2112111 appears, a different model number will be shown. Here's my example 1112111=HRV019SB1 2112111=HRH019SB1 1113111=HRV024SB1 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If statement
You can stack the IF statements all into one:
=IF(H4=1112111,"HRV019SB1",IF(H4=2112111,"HRH019SB 1",IF(H4=1113111,"HRV024SB1","not found"))). That works, but you can only go 7 deep that way on Excel 2003. You could build a lookup table in a formula as long as you remember to keep the numeric values in ascending order, like so: =LOOKUP(H4,{1112111,1113111,2112111},{"HRV019SB1", "HRV024SB1","HRH019SB1"}) -- "Actually, I AM a rocket scientist." -- JB "Zack" wrote: In cell H4 I want one of three model numbers to appear. Each model number is assigned a value, so 1112111 will equal HRV019SB1. So the formula for H4 is, as of now, =IF(H4=1112111,"HRV019SB1"). And that works great if 1112111 appears. How do I write the formula for multiple values, so if 2112111 appears, a different model number will be shown. Here's my example 1112111=HRV019SB1 2112111=HRH019SB1 1113111=HRV024SB1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum if statement with a left statement | Excel Discussion (Misc queries) | |||
SUMIF statement with AND statement | Excel Discussion (Misc queries) | |||
Can an If statement answer an If statement? | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions | |||
Help please, IF statement/SUMIF statement | Excel Worksheet Functions |