ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   compare two lists (https://www.excelbanter.com/excel-discussion-misc-queries/161934-compare-two-lists.html)

saman110 via OfficeKB.com

compare two lists
 
Hello,

I would like to compare two wks and copy the corresponding data. For example.

In Sheet 1 I have:

Concord 94518
Concord 94519
Concord 94520
Concord 94521
Concord 94523


In Sheet 2 I have:

Concord
Concord
Concord
Concord
Concord
Concord
Concord
Concord

The result I should get in Sheet 1:

Concord 94518
Concord 94519
Concord 94520
Concord 94521
Concord 94523
Concord 94518
Concord 94519
Concord 94520


Any Help?

Thx.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1


Excel_Learner

compare two lists
 
You have to do a trick.
1st add a column before Concord column and type
=countif(b$2:b2, b2)
in sheet two (if there are only 5 record in sheet 1 you have to start your
data from row 6 in sheet 2)
type in column B
=VLOOKUP(IF(MOD(ROW(6:6),5)=0,5,MOD(ROW(6:6), 5)),Sheet1!$A$6:$c$10,3,0)
I hope it will work for you.
"saman110 via OfficeKB.com" wrote:

Hello,

I would like to compare two wks and copy the corresponding data. For example.

In Sheet 1 I have:

Concord 94518
Concord 94519
Concord 94520
Concord 94521
Concord 94523


In Sheet 2 I have:

Concord
Concord
Concord
Concord
Concord
Concord
Concord
Concord

The result I should get in Sheet 1:

Concord 94518
Concord 94519
Concord 94520
Concord 94521
Concord 94523
Concord 94518
Concord 94519
Concord 94520


Any Help?

Thx.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1



saman110 via OfficeKB.com

compare two lists
 
Hi,

your formula would work if I had concord sorted, but I have other concord in
other states.

ex.

CA Concord
CA Walnut Creek
CA Pittsburg
PA Concord


saman110 wrote:
Hello,

I would like to compare two wks and copy the corresponding data. For example.

In Sheet 1 I have:

Concord 94518
Concord 94519
Concord 94520
Concord 94521
Concord 94523

In Sheet 2 I have:

Concord
Concord
Concord
Concord
Concord
Concord
Concord
Concord

The result I should get in Sheet 1:

Concord 94518
Concord 94519
Concord 94520
Concord 94521
Concord 94523
Concord 94518
Concord 94519
Concord 94520

Any Help?

Thx.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1



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

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