merging two worksheets

J

Jim B

I have two woksheets of voter data. The first worksheet has three columns:
Voter ID#, Election Date, Election discription, Voting Method.

The second worksheet has multiple columns, the first being Voter ID#. The
remaining columns are -First Name, Last Name, Street number, Street Name,
Phone number, Precinct Name, ....and so on.

I wish to pull the individual information columns from the second worksheet
into the First worksheet based upon the 1st column that is common to both
worksheets-Voter ID#.

There are more entiries in the second worksheet than the first. I only need
the additional info from the second worksheet for the Voter ID#s that are
listed in the First worksheet.

This is 140,755 rows for The First woksheet.

I am a novice at this. I have the original data of these worksheets on a CD
in text, comma deliniated format also, if this helps make it easier. I do not
have Access, but I am not opposed to getting it if it would make this easier.
 
A

Ashish Mathur

Hi,

In the first worksheet, use the VLOOKUP() function. You may read up on the
same in the Help menu - it is well explained.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
P

Pete_UK

Looks like you have 4 columns of data in Sheet1, not 3.

If you have Excel 2007 then you will be able to get 140k rows of data
on one worksheet, but if you are using XL2003 or earlier then you are
limited to 64k rows per sheet.

Try this formula in E2 of Sheet1 (assuming you have a header row):

=IF(ISNA(MATCH($A2,Sheet2!$A:$A,0)),"",VLOOKUP($A2,Sheet2!$A:$G,COLUMN
(B2),0))

I have assumed that you have data in coumns A to G of the second
sheet, so you need to change the reference to suit your data.

You can copy this formula across to suit the number of columns of data
you want to bring from Sheet2, and then copy the formulae down for as
far as you need to (though you may have to copy the formula down each
column in turn, one column at a time - a quick way is to double-click
the fill handle of the cursor (the small black square in the bottom
right-corner of the cursor) with E2 selected, then F2 selected, and so
on). Once you have done this you can fix the values from these
formulae by highlighting all the columns containing formulae, clicking
<copy>, then right-click the mouse button and Paste Special | Values
(check) | OK then press <Esc>.

Sheet2 can then be removed, and the updated Sheet1 saved with a new
name (so as to preserve the original file).

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top