Comparing Cell Values And Copying Matches To Another Column

April12

New Member
Joined
Apr 7, 2008
Messages
2
Greetings,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
I am familiar with Excel but I am a newbie to macros. I am using Excel 2003 and I am working on a couple of spreadsheets that contains over 50,000 rows. My problem is this: I need to look at values in column "A" of spreadsheet 1 and compare them to the values in column "A" of spreadsheet 2. If the values match for a certain row, then I need to copy the value on column B of spreadsheet 1 and paste it to column B of spreadsheet two. That is, i need help in accomplishing the following (Just an example):<o:p></o:p>
  1. <o:p></o:p>


  1. [*]Look at values column A, spreadsheet 1<o:p></o:p>


    [*]Compare to values in Column A, spreadsheet 2<o:p></o:p>


    [*]if (lets say) row 4 in column A, sheet 1 matches row 10, column A, sheet 2 then...<o:p></o:p>


    [*]...copy values in row 4, column B, sheet 1<o:p></o:p>


    [*]paste value to row 10, column B, sheet 2<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
I hope this does not sound too confusing... i know it is to me. Can someone perhaps help with this? I would truly appreciate it.<o:p></o:p>
<o:p></o:p>
PS.- i could even paste all the values from one sheet to another so that I can have all the values in one sheet if this would make it easier. That way i would need to compare values in one column to values in another column in the same sheet. <o:p></o:p>
<o:p></o:p>
April12
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
In a test on Sheet 2 I entered data in 3 cells (A1:A3)
In Sheet1 Cell B2 I entered

=ISNUMBER(MATCH(A2,Sheet2!$A$1:$A$3,0)) and copied down
Note the TRUE rows are also in Sheet2 - the FALSE rows are not.
 
Upvote 0
Hello Jim,
Thanks a lot for the quick response. That helped easily identify the rows I needed. Again, Thanks.
You Rock!!

April12
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,426
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top