View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Petersjill Petersjill is offline
external usenet poster
 
Posts: 8
Default Can I merge columns from one spreadsheet into another?

OMG you're brilliant! Thank you!!!! It had a $, but for some reason was set
to 220, so after that it stopped working. I changed it to $2330 and now it
worked. THANK YOU!!!

"Barb Reinhardt" wrote:

Check to see that your table arrays value didn't change when you copied it.
You may need to add $ to ensure they don't change.

"Petersjill" wrote:

Hey, it finally worked! Well, mostly. It worked great for the first 223
records and then I just get #N/A for the rest of them. I dragged the formula
all the way down but for some reason it just stopped working.
I wonder if it's because on Sheet 1 I have 2330 records and one Sheet 2 I
only have 2304. I thought the purpose of matching on the account number was
that it would just skip the missing ones. But I don't see a mis-match
between records 223 and 224. The names/account numbers go in the same order
at that point. ugh. So close. Any thoughts?
Thanks so much for your help getting me to this point.

"Barb Reinhardt" wrote:

Lookup value - This would be the account number on the sheet that doesn't
have departments. Sheet1!A2
Table Array - let's say the account number is in column A, the department
number is in column B and the data is in rows 2-10. The first column must
have data that matches the Lookup value. Sheet2!A$2:B$10
Col Index Num - How many columns over from the first column is the data you
want to extract.
Range Lookup - I generally use FALSE to get an exact match.


"Petersjill" wrote:

Sorry to be so dense, but I just keep getting errors.
When I click on vlookup I get a formula box that asks for 4 things:
Lookup value
Table Array
Col Index Num
Range Lookup

I can't figure out where to put the account nubmers from which sheets and
where to put the department. And do I click on the whole column, or just the
column heading? What is it that has to be in the leftmost column? Is that
the account number, or the department? On on which sheet does it need to be
the leftmost?



"Barb Reinhardt" wrote:

Let's say you have both ACCOUNT NUMBER (column A) and DEPARTMENT(Column B) on
Sheet2 and you have only ACCOUNT NUMBER (A2) on Sheet1.

Try this:

Sheet1!B2: =VLOOKUP(A2,Sheet2!A$2:B$10,2,FALSE)

Copy the value down as needed.

HTH,
Barb Reinhardt
"Petersjill" wrote:

I've been playing around with that, but I can't get it to work. It's telling
me that I'm using circular logic.

The two columns that are the same in both spreadsheet are account number.
(The account number is the unique identifier.) The column I'm trying to add
is Department. So which column do I put in which of the three options I get
under VLookup?


"Barb Reinhardt" wrote:

Take a look at the VLOOKUP function and see if it does what you want.

HTH,
Barb Reinhardt

"Petersjill" wrote:

I have two spreadsheets with columns of variables. I have a unique
identifier variable consistent in the two spreadsheets, but some columns in
the second spreadsheet that aren't in the first. I would like to merge the
data in the extra columns on the second spreadsheet into the first
spreadsheet based on the unique identifier (so the data corresponds with the
correct row, and isn't just the equivalent of a cut and paste). Does anyone
know how I can do this?