ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sort and/or merge to worksheets. (https://www.excelbanter.com/excel-worksheet-functions/132376-sort-merge-worksheets.html)

mikri

Sort and/or merge to worksheets.
 
Hi,
I am new to Excel, and need some help in sorting and/or merging two
worksheets. The scenario is:

I have two worksheets (let's say "T1" and "T2"), each contain two columns of
data.
The worksheet "T1" is a complete list of tag's (column A) and it's
describing text (column B).
The worksheet "T2" is arranged in the same way, but it doesn't contain the
complete list of tags (just a few hundred of them) the describing text on the
other hand is different. My goal is to replace the describing text for each
tag (for each tag that also exist in "T2") in "T1" with the text from the
same tag in "T2".

Is there an easy way to do this?

regards,

mikri.

Toppers

Sort and/or merge to worksheets.
 

in C1 in T1 put the following and copy down

=if(ISNA(VLOOKUP(A1,T2!A:B,2,0)),B1,VLOOKUP(A1,T2! A:B,2,0))

This will place T2 descriptions in column C where matched or existing Column
B descriptions where no match.

If correct, copy, paste special==values in Column C and then delete B.

TEST FIRST!

"mikri" wrote:

Hi,
I am new to Excel, and need some help in sorting and/or merging two
worksheets. The scenario is:

I have two worksheets (let's say "T1" and "T2"), each contain two columns of
data.
The worksheet "T1" is a complete list of tag's (column A) and it's
describing text (column B).
The worksheet "T2" is arranged in the same way, but it doesn't contain the
complete list of tags (just a few hundred of them) the describing text on the
other hand is different. My goal is to replace the describing text for each
tag (for each tag that also exist in "T2") in "T1" with the text from the
same tag in "T2".

Is there an easy way to do this?

regards,

mikri.


joel

Sort and/or merge to worksheets.
 
If the tags are unique, then the lookup function is what you want to do

I would add a new column to T1 that adds something like this

Add to cell C2 and copy to every cell in column c.
=lookup(A2,'T2'B2: B1000,'T2'B2: B1000)

then add a new column D which will take column C if there is data,
otherwise, take column B

Add to cell D2 and copy to evvery cell
=if(C2 = "",B2,C2)

You can then hide columns C and D.



"mikri" wrote:

Hi,
I am new to Excel, and need some help in sorting and/or merging two
worksheets. The scenario is:

I have two worksheets (let's say "T1" and "T2"), each contain two columns of
data.
The worksheet "T1" is a complete list of tag's (column A) and it's
describing text (column B).
The worksheet "T2" is arranged in the same way, but it doesn't contain the
complete list of tags (just a few hundred of them) the describing text on the
other hand is different. My goal is to replace the describing text for each
tag (for each tag that also exist in "T2") in "T1" with the text from the
same tag in "T2".

Is there an easy way to do this?

regards,

mikri.


mikri

Sort and/or merge to worksheets.
 
Thanks!

Both suggestions works perfect!

"Toppers" wrote:


in C1 in T1 put the following and copy down

=if(ISNA(VLOOKUP(A1,T2!A:B,2,0)),B1,VLOOKUP(A1,T2! A:B,2,0))

This will place T2 descriptions in column C where matched or existing Column
B descriptions where no match.

If correct, copy, paste special==values in Column C and then delete B.

TEST FIRST!

"mikri" wrote:

Hi,
I am new to Excel, and need some help in sorting and/or merging two
worksheets. The scenario is:

I have two worksheets (let's say "T1" and "T2"), each contain two columns of
data.
The worksheet "T1" is a complete list of tag's (column A) and it's
describing text (column B).
The worksheet "T2" is arranged in the same way, but it doesn't contain the
complete list of tags (just a few hundred of them) the describing text on the
other hand is different. My goal is to replace the describing text for each
tag (for each tag that also exist in "T2") in "T1" with the text from the
same tag in "T2".

Is there an easy way to do this?

regards,

mikri.



All times are GMT +1. The time now is 01:35 PM.

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