Populating a column in a worksheet from another worksheet based on a common field

P

p.krembs

Hey folks...

I know this has had to have been done before. Basically, I have an
original worksheet, and another worksheet that contains values that I
want to populate a column in the original worksheet with, based on a
common field. But it gets tricky, because the 2nd worksheet contains
some IDs (common field values) that are NOT in worksheet 1. And I'd
like to know which ones those are, preferably with them being put into
a 3rd worksheet automatically...

here is the original spreadsheet in a nutshell:

PARCEL_ID | ELEVATION
1111
2222
3333
4444

The elevation field is empty--- it's the column I want to populate
using the output from a model I ran with the same parcel data, except
the model's parcel data includes some additional parcels which are not
part of the original spreadsheet. Here's an example--

PARCEL_ID | ELEVATION
1111.......................20
2222.......................21
7777.......................22
8888.......................23

(ignore the periods...they're place holders)

So, as you can see, I have a common field. I want to simply populate
spreadsheet 1 with the elevations from spreadsheet 2...but spreadsheet
2 contains some parcels that aren't in spreadsheet 1, and I'd like them
to be placed in a new speadsheet by themselves.

Any ideas?

Thanks in advance!
 
P

Pete_UK

You can use VLOOKUP to fill in the Elevation field of the original
sheet. Something like:

=VLOOKUP(A2,'Parcel data'!A$2:B$100,2,0)

Adjust the range to suit and copy down.

You can also use this in the Parcel Data sheet to see if the ID exists
in the Original Sheet - try this in C2:

=VLOOKUP(A2,'Original Sheet'!A$2:A$100,1,0)

Again, adjust the range and copy down. If the ID is not present in the
Original Sheet you will get a #N/A error, and you can apply a filter on
this column to select those with this error. You can then highlight
them and copy to the third sheet. The helper column can be deleted.

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