If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
How to make a cell value generate a cell value in another cell
VLOOKUP, as you say, is probably best If your table is C110 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
|
|||
|
|||
How to make a cell value generate a cell value in another cell
You saved me a ton of work, thanks a LOT!!!!
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can I make a formula in Excel to display result in same cell? | Neiko | Worksheet Functions | 2 | October 1st, 2005 10:36 PM |
When calling a different file, can I make the tab equal to a cell? | thebigd08 | General Discussion | 1 | June 24th, 2005 12:39 AM |
Copy cell format to cell on another worksht and update automatical | kevinm | Worksheet Functions | 21 | May 19th, 2005 11:07 AM |
how do I make a word typed in a cell go to a specific cell in anot | Lmatarazzo | General Discussion | 3 | April 21st, 2005 04:29 AM |
up to 7 functions? | ALex | Worksheet Functions | 10 | April 12th, 2005 06:42 PM |