Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How to make a cell value generate a cell value in another cell
Hello,
I need to make a cell value generate a cell value in another cell. Example. If cell A1 contains "Apple" I want B1 to have the value "fruit". If I write beatles in A1 I want B1 to spell out "music" I have a list of two columns Apple fruit Strawberry berries Saw hardware Beatles music .. .. My original solution to this problem was to use the if-function in B2 like this =IF(A1="Apple", "fruit", IF(A1="Strawberry", "berries" IF(A1="Saw", "hardware",....)))) This may not be very elegant but it worked until I had a list that was longer then 7. Apparently Excel can't handle more then 7 if-functions. There should be an easier way to accomplish this. I could probably write the If-functions directly into the macro that I'm building but I would appreciate a easier solution. Perhaps something containing the VLOOKUP-function? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How to make a cell value generate a cell value in another cell
VLOOKUP, as you say, is probably best If your table is C1:D10 then use this formula in B1 =VLOOKUP(A1,$C$1:$D$10,2,0) -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=504823 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How to make a cell value generate a cell value in another cell
You saved me a ton of work, thanks a LOT!!!!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Generate random numberes using reference to the other cell. | Excel Worksheet Functions | |||
How to take a cell that has 3 values and make 2 more new lines | Excel Worksheet Functions | |||
How do I make a picture stay inside a cell? | Excel Discussion (Misc queries) | |||
cell color index comparison | New Users to Excel | |||
make a cell empty based on condition | Charts and Charting in Excel |