Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embetting Vlookup in IF statement
I want to look at a cell and if it has a certain value, return another
value in my target cell but if it has some other value, I what excel to look at a table and find the value and return the cell value? For example. I have a cell where the value is SP. If the value is SP, then put Super Puppy in my target cell. But if excel looks at the cell and it is not SP, but TO, I want excel to go to a table and lookup a then value in the cell (TO) and put Totally Outrageous in that cell. If the cell has something else, it would lookup that value and place it in that cell. Anyone know how to do this? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embetting Vlookup in IF statement
Try something like
=IF(A1="SP","Super Puppy",VLOOKUP(A1,B1:C10,2,FALSE)) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com wrote in message oups.com... I want to look at a cell and if it has a certain value, return another value in my target cell but if it has some other value, I what excel to look at a table and find the value and return the cell value? For example. I have a cell where the value is SP. If the value is SP, then put Super Puppy in my target cell. But if excel looks at the cell and it is not SP, but TO, I want excel to go to a table and lookup a then value in the cell (TO) and put Totally Outrageous in that cell. If the cell has something else, it would lookup that value and place it in that cell. Anyone know how to do this? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embetting Vlookup in IF statement
Great. Thanks Chris. I got that to work.
John |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embetting Vlookup in IF statement
It sounds like an =vlookup() formula would be what you're looking for:
=if(a2="","",vlookup(a2,sheet2!a:b,2,false)) You may want to read Debra Dalgleish's notes: http://www.contextures.com/xlFunctions02.html wrote: I want to look at a cell and if it has a certain value, return another value in my target cell but if it has some other value, I what excel to look at a table and find the value and return the cell value? For example. I have a cell where the value is SP. If the value is SP, then put Super Puppy in my target cell. But if excel looks at the cell and it is not SP, but TO, I want excel to go to a table and lookup a then value in the cell (TO) and put Totally Outrageous in that cell. If the cell has something else, it would lookup that value and place it in that cell. Anyone know how to do this? Thanks. -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embetting Vlookup in IF statement
Thank you Dave. I am new to this stuff and it is exciting to see it
work. JOhn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF Statement or VLOOKUP | Excel Discussion (Misc queries) | |||
Vlookup, if statement, maybe an and statement | Excel Discussion (Misc queries) | |||
vlookup or if statement | Excel Worksheet Functions | |||
If Statement with VLookup | Excel Worksheet Functions | |||
if statement with vlookup | Excel Programming |