ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Perform a "Conditional Substitute/Replace" (https://www.excelbanter.com/excel-worksheet-functions/113754-perform-conditional-substitute-replace.html)

Bay Area DebG

Perform a "Conditional Substitute/Replace"
 
I have two worksheets:
1st wksht has raw data including one column with users' unix IDs
2nd wksht has users' full names

After adding a new column to the right of the unix ID column, I want to
search for every occurrence of each user's unix ID (in the 1st wksht) and
place the user's full name (from the 2nd wksht) into the new column on the
right (for instance:

Sheet1 unix id="brubble"
Sheet2 unix id="Barney Rubble (brubble)"
After adding new column to right of Sheet1 unix id="brubble", function
searches Sheet2 and every row that contains "brubble" will have "Barney
Rubble (brubble)" placed in cell immediately to the right.

Hope this makes sense.

BTW, using Excel 2003 on a Windows 2000 platform

--
Thanks!
Bay Area DebG

Toppers

Perform a "Conditional Substitute/Replace"
 
If I understand correctly, the ID in Sheet1 is embedded in the ID name in
Sheet2 i.e in the brackets and not in a separate column If this is correct
try putting this in B2 in Sheet1 and copy down:

=VLOOKUP("*" & A2&"*",Sheet2!A:A,1,FALSE)

It assumes IDs & ID names are in column A on both sheets.

HTH

"Bay Area DebG" wrote:

I have two worksheets:
1st wksht has raw data including one column with users' unix IDs
2nd wksht has users' full names

After adding a new column to the right of the unix ID column, I want to
search for every occurrence of each user's unix ID (in the 1st wksht) and
place the user's full name (from the 2nd wksht) into the new column on the
right (for instance:

Sheet1 unix id="brubble"
Sheet2 unix id="Barney Rubble (brubble)"
After adding new column to right of Sheet1 unix id="brubble", function
searches Sheet2 and every row that contains "brubble" will have "Barney
Rubble (brubble)" placed in cell immediately to the right.

Hope this makes sense.

BTW, using Excel 2003 on a Windows 2000 platform

--
Thanks!
Bay Area DebG


Bay Area DebG

Perform a "Conditional Substitute/Replace"
 
That worked perfectly. You are an absolute god/goddess... I shall be grateful
forever! THANK YOU!!! :-)
--
Let me know if this helps!
Bay Area DebG


"Toppers" wrote:

If I understand correctly, the ID in Sheet1 is embedded in the ID name in
Sheet2 i.e in the brackets and not in a separate column If this is correct
try putting this in B2 in Sheet1 and copy down:

=VLOOKUP("*" & A2&"*",Sheet2!A:A,1,FALSE)

It assumes IDs & ID names are in column A on both sheets.

HTH

"Bay Area DebG" wrote:

I have two worksheets:
1st wksht has raw data including one column with users' unix IDs
2nd wksht has users' full names

After adding a new column to the right of the unix ID column, I want to
search for every occurrence of each user's unix ID (in the 1st wksht) and
place the user's full name (from the 2nd wksht) into the new column on the
right (for instance:

Sheet1 unix id="brubble"
Sheet2 unix id="Barney Rubble (brubble)"
After adding new column to right of Sheet1 unix id="brubble", function
searches Sheet2 and every row that contains "brubble" will have "Barney
Rubble (brubble)" placed in cell immediately to the right.

Hope this makes sense.

BTW, using Excel 2003 on a Windows 2000 platform

--
Thanks!
Bay Area DebG



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com