A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to make a cell value generate a cell value in another cell



 
 
Thread Tools Display Modes
  #1  
Old January 25th, 2006, 09:59 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default 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  
Old January 25th, 2006, 10:18 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default 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  
Old January 25th, 2006, 11:39 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 10:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.