Matching and Copying Data from Two Worksheets

AJJ

New Member
Joined
May 26, 2011
Messages
2
It's a mess.


I inherited a project which has two databases. One is a membership program (MT) and one in Excel. The MT will allow me to export data in CSV format.


The MT program has the names, member ID#, and address data for the members. The excel database contains the names and Member ID numbers of some (not all) of the members in the MT program -- but no address data.


I could create two worksheets: One with the original excel data which only has name and member ID -- and the other with the name, member ID, and address (from a CSV version of the MT data).


Is there a way to use the member ID number in the worksheet 1 to somehow locate and import the matching address data into worksheet 2 so it will appear in the correct member's row? Keep in mind that I only want the address data for some (about 200) of the members (about 2,000).


I hope I've explained this sufficiently. Thanks,

AJJ
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
A simple VLOOKUP -formula should do it as long as the Member ID's are identical & both workbooks are open:

In the Excel-worksheet you type =VLOOKUP(ID,DataRange,ColumnNumber,FALSE) where

ID = The cell where the lookup ID is found (=A2 or whatever the cell is)
DataRange = The whole range where all the info is found from. Note that the IDNumber must be found from the first column of that range and all the other info to the right from it. If the data is in another workbook it might be easier to select the data range with the mouse rather than typing it. Just make sure the range is locked ($-sings before the column / row addresses).
ColumnNumber = The column number where the data you want to get is found from: If IDNumbers are found from the column A, Then A=1, B=2, etc.
The last one, FALSE, is a needed argument. It tells the function to look for exact matches. Without it the function would look for the first value that's bigger than the one it's looking for and return the previous value. Good for a lot of things but bad for member information.

Here's a more detailed tutorial for VLOOKUP-function: http://www.contextures.com/xlfunctions02.html Google for more if you need.
 
Upvote 0
Thank you very much for your help with this. Very kind of you to reply.

Thanks,

AJJ
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,813
Members
452,945
Latest member
Bib195

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