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  

Automating search and replace



 
 
Thread Tools Display Modes
  #1  
Old October 13th, 2008, 03:26 PM posted to microsoft.public.excel.worksheet.functions
Wellman[_2_]
external usenet poster
 
Posts: 1
Default Automating search and replace

I'm trying to do something simple, yet I can't figure it out.

I have two spreadsheet. One includes company names and "codes":

QWE843 | Apple
FER244 | Dell
RWT224 | HP

and so on.

In another spreadsheet I have a list of people from each company, but
instead of the company name, they have their company code:

QWE843 | Joe Doe
FER244 | Mary Monson
QWE843 | Steve Jobs
FER244 | Donald Duck

What I'd like to do is to add a column with the company names in the second
spreadsheet, taking the first spreadsheet as a reference. So, the end result
would be

QWE843 | Joe Doe | Apple
FER244 | Mary Monson | Dell
QWE843 | Steve Jobs | Apple
FER244 | Donald Duck | Dell

I tried with if, then, if, then... but it's too many parameters (there are
about 300 different company codes). Is this doable?

Thanks!

M.

  #2  
Old October 13th, 2008, 03:37 PM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default Automating search and replace

Try this in column C of your second sheet:

=VLOOKUP(A1,Sheet1!A:B,2,0)

and copy down for as many names as you have.

Hope this helps.

Pete

On Oct 13, 3:26*pm, Wellman wrote:
I'm trying to do something simple, yet I can't figure it out.

I have two spreadsheet. One includes company names and "codes":

QWE843 | Apple
FER244 | Dell
RWT224 | HP

and so on.

In another spreadsheet I have a list of people from each company, but
instead of the company name, they have their company code:

QWE843 | Joe Doe
FER244 | Mary Monson
QWE843 | Steve Jobs
FER244 | Donald Duck

What I'd like to do is to add a column with the company names in the second
spreadsheet, taking the first spreadsheet as a reference. So, the end result
would be

QWE843 | Joe Doe | Apple
FER244 | Mary Monson | Dell
QWE843 | Steve Jobs | Apple
FER244 | Donald Duck | Dell

I tried with if, then, if, then... but it's too many parameters (there are
about 300 different company codes). Is this doable?

Thanks!

M.


  #3  
Old October 13th, 2008, 03:43 PM posted to microsoft.public.excel.worksheet.functions
Sheeloo[_3_]
external usenet poster
 
Posts: 1,713
Default Automating search and replace

Assuming the complete list in Sheet1 Col A & B
and the details in Sheet2 A-B then put this in Sheet 2 C1 and copy down

=VLOOKUP(A1,Sheet1!A:B,2,false)
--
To get my email id paste my address in an Excel cell and press Enter...


"Wellman" wrote:

I'm trying to do something simple, yet I can't figure it out.

I have two spreadsheet. One includes company names and "codes":

QWE843 | Apple
FER244 | Dell
RWT224 | HP

and so on.

In another spreadsheet I have a list of people from each company, but
instead of the company name, they have their company code:

QWE843 | Joe Doe
FER244 | Mary Monson
QWE843 | Steve Jobs
FER244 | Donald Duck

What I'd like to do is to add a column with the company names in the second
spreadsheet, taking the first spreadsheet as a reference. So, the end result
would be

QWE843 | Joe Doe | Apple
FER244 | Mary Monson | Dell
QWE843 | Steve Jobs | Apple
FER244 | Donald Duck | Dell

I tried with if, then, if, then... but it's too many parameters (there are
about 300 different company codes). Is this doable?

Thanks!

M.

 




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:46 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.