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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Relating one column to another



 
 
Thread Tools Display Modes
  #1  
Old May 10th, 2004, 01:19 PM
Alan Parker
external usenet poster
 
Posts: n/a
Default Relating one column to another

Stupid newbie question coming up:

Let's say that in column A I have a series (not sequential) of numbers. In
column B I have a word that goes with that number.

In column C, I have numbers, which represent the same words as the number in
column a represents the word in column B.

In other words, I have:

Number Word Type:
1: Banana 2
2: Fruit
3: Sausage 4
4: Meat

I want to end up with

Number Word Type:
1: Banana Fruit
2: Fruit
3: Sausage Meat
4: Meat

Search and replace is out of the question, as there are 361 "things" under
about 140 "types".

The output is the only way I could get it from a database which is now no
longer there.

Is there any way of doing this in Excel? Thanks!


  #2  
Old May 10th, 2004, 01:36 PM
RagDyeR
external usenet poster
 
Posts: n/a
Default Relating one column to another

With data starting in A2 to C100,
Add a "helper" column D.

In D2, enter this formula:

=IF(C2"",INDEX($B$2:$B$100,MATCH(C2,$A$2:$A$100, 0)),"")

And copy down as needed.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Alan Parker" wrote in message
...
Stupid newbie question coming up:

Let's say that in column A I have a series (not sequential) of numbers. In
column B I have a word that goes with that number.

In column C, I have numbers, which represent the same words as the number in
column a represents the word in column B.

In other words, I have:

Number Word Type:
1: Banana 2
2: Fruit
3: Sausage 4
4: Meat

I want to end up with

Number Word Type:
1: Banana Fruit
2: Fruit
3: Sausage Meat
4: Meat

Search and replace is out of the question, as there are 361 "things" under
about 140 "types".

The output is the only way I could get it from a database which is now no
longer there.

Is there any way of doing this in Excel? Thanks!



  #3  
Old May 10th, 2004, 01:45 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default Relating one column to another

Add a help column for simplicity assume you use column D
assume all data starts in row 2 so in D2 put this formula

=IF(C2="","",VLOOKUP(C2,$A$2:$B$500,2,0))

copy down the formula alongside C, when done copy the new column,
do editpaste special as values in place, delete column C
I noticed that the numbers in A have a colon after them,
is that the way it is? If so use

=IF(C2="","",VLOOKUP(C2&"*",$A$2:$B$500,2,0))

--

Regards,

Peo Sjoblom

"Alan Parker" wrote in message
...
Stupid newbie question coming up:

Let's say that in column A I have a series (not sequential) of numbers. In
column B I have a word that goes with that number.

In column C, I have numbers, which represent the same words as the number

in
column a represents the word in column B.

In other words, I have:

Number Word Type:
1: Banana 2
2: Fruit
3: Sausage 4
4: Meat

I want to end up with

Number Word Type:
1: Banana Fruit
2: Fruit
3: Sausage Meat
4: Meat

Search and replace is out of the question, as there are 361 "things" under
about 140 "types".

The output is the only way I could get it from a database which is now no
longer there.

Is there any way of doing this in Excel? Thanks!




  #4  
Old May 10th, 2004, 02:26 PM
Alan Parker
external usenet poster
 
Posts: n/a
Default Relating one column to another

"Peo Sjoblom" wrote in message
...
Add a help column for simplicity assume you use column D
assume all data starts in row 2 so in D2 put this formula

=IF(C2="","",VLOOKUP(C2,$A$2:$B$500,2,0))


"RagDyeR" wrote in message
...
With data starting in A2 to C100,
Add a "helper" column D.
In D2, enter this formula:
=IF(C2"",INDEX($B$2:$B$100,MATCH(C2,$A$2:$A$100, 0)),"")
And copy down as needed.


Many thanks to both of you - it worked fine! How do you work these things
out?? It would have taken me days!
I've been googling for this all morning, but it's very hard to find the
right keywords (got plenty of Excel tips sites in the bookmarks now,
though!)


 




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


All times are GMT +1. The time now is 06:24 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.