Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Wayne
 
Posts: n/a
Default Compare data on 2 separate worksheets.

I am trying to figure out how I can compare data on 2 different worksheets.
Here is what I am trying to do...

I have Worksheet 1 (WS1) and Worksheet 2 (WS2). Each worksheet has over 5000
rows. I need to compare the data in WS1-column B and WS2-column B. If there
are any entries that match, I need the data that is in WS2-column A to be
copied and pasted into WS1-column A.

Is there an easy way to do this?

Your help is appreciated.

-Wayne

  #2   Report Post  
bj
 
Posts: n/a
Default

assuming not more than one match per item
in column A sheet 1
=if(iserror(match(B1,Sheet2!B:B,0),"",Offset(Sheet 2!A1,match(B1,Sheet2!B:B,0)-1,0)

"Wayne" wrote:

I am trying to figure out how I can compare data on 2 different worksheets.
Here is what I am trying to do...

I have Worksheet 1 (WS1) and Worksheet 2 (WS2). Each worksheet has over 5000
rows. I need to compare the data in WS1-column B and WS2-column B. If there
are any entries that match, I need the data that is in WS2-column A to be
copied and pasted into WS1-column A.

Is there an easy way to do this?

Your help is appreciated.

-Wayne

  #3   Report Post  
Don S
 
Posts: n/a
Default

On Wed, 6 Jul 2005 13:10:03 -0700, "Wayne"
wrote:

I am trying to figure out how I can compare data on 2 different worksheets.
Here is what I am trying to do...

I have Worksheet 1 (WS1) and Worksheet 2 (WS2). Each worksheet has over 5000
rows. I need to compare the data in WS1-column B and WS2-column B. If there
are any entries that match, I need the data that is in WS2-column A to be
copied and pasted into WS1-column A.

Is there an easy way to do this?

Your help is appreciated.

-Wayne



Wayne,

Here is a "bulldog" way to do it:

In column "C" (or anywhere convenient) put the formula
=if(ws1!b1=ws2!b1,ws2!a1," ") Then sort on column "C" so all the
results are in one contiguous set of rows. From there, you can copy
Column "C" to Column "A" (copy/paste values).

Good Luck,

Don S
  #4   Report Post  
Ashish Mathur
 
Posts: n/a
Default

Hi,

Here is another solution though not the best one. In cell A1 in WS1, array
enter (Ctrl+Shift+Enter) the following formula

IF(OR(EXACT(A1,WS2!$A$1:A500)),A1,"")

The reason i say this is not the best solution is that there will be blanks
in rows where there is no match.

Hope this of some help

"Wayne" wrote:

I am trying to figure out how I can compare data on 2 different worksheets.
Here is what I am trying to do...

I have Worksheet 1 (WS1) and Worksheet 2 (WS2). Each worksheet has over 5000
rows. I need to compare the data in WS1-column B and WS2-column B. If there
are any entries that match, I need the data that is in WS2-column A to be
copied and pasted into WS1-column A.

Is there an easy way to do this?

Your help is appreciated.

-Wayne

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
How do I sort data into 2 worksheets in excel vba? luk_sr Excel Worksheet Functions 1 February 23rd 05 12:13 AM
calculations from data in other worksheets Tolleen Excel Worksheet Functions 1 January 11th 05 07:01 AM
Merge Data From Multiple Worksheets Corby Excel Worksheet Functions 1 December 22nd 04 03:25 PM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM


All times are GMT +1. The time now is 05:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"