ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help to import data from reference workbook (https://www.excelbanter.com/excel-discussion-misc-queries/35933-help-import-data-reference-workbook.html)

JackSpam

Help to import data from reference workbook
 
I wasn't sure if this would require VB or not so I've put this in the
General Question group.
I have 2 workbooks where the first 3 columns of each row (after a title row)
consist of an ID number, a North coordinate and an East Coordinate. Workbook
A is complete in that every ID for our system is included along with the
coresponding North and East coords.
Workbook B includes a subset of the IDs and only some of the IDs have their
coords in columns B and C. How do I import the coords into Workbook B
without having to copy/paste a thousand or more times. Thanks in advance for
any help.

Biff

Hi!

With both workbooks open you could use a Vlookup formula to get the data
from fileA to fileB. Then after that was completed you could convert the
formulas to constants.

Assume data in fileA is on Sheet1 in the range A2:C100

ID's in fileB are on Sheet1 in the range A2:A50

In B2 of fileB use a formula like this:

=VLOOKUP($A2,[fileA.xls]Sheet1!$A$2:$C$100,COLUMN(B$1),0)

Copy across to C2 then down as needed.

Once all the data is returned and you're satisfied, select fileB columns B
and C and then do copy/paste special/values.

Biff

"JackSpam" wrote in message
...
I wasn't sure if this would require VB or not so I've put this in the
General Question group.
I have 2 workbooks where the first 3 columns of each row (after a title
row)
consist of an ID number, a North coordinate and an East Coordinate.
Workbook
A is complete in that every ID for our system is included along with the
coresponding North and East coords.
Workbook B includes a subset of the IDs and only some of the IDs have
their
coords in columns B and C. How do I import the coords into Workbook B
without having to copy/paste a thousand or more times. Thanks in advance
for
any help.




JackSpam


Thanks so much for the help. In hind sight it was so simple. I ended up
expanding the vlookup function to integrate 3 columns and still had time for
a morning bike ride before temps hit 100. Take care.

"Biff" wrote:

Hi!

With both workbooks open you could use a Vlookup formula to get the data
from fileA to fileB. Then after that was completed you could convert the
formulas to constants.

Assume data in fileA is on Sheet1 in the range A2:C100

ID's in fileB are on Sheet1 in the range A2:A50

In B2 of fileB use a formula like this:

=VLOOKUP($A2,[fileA.xls]Sheet1!$A$2:$C$100,COLUMN(B$1),0)

Copy across to C2 then down as needed.

Once all the data is returned and you're satisfied, select fileB columns B
and C and then do copy/paste special/values.

Biff

"JackSpam" wrote in message
...
I wasn't sure if this would require VB or not so I've put this in the
General Question group.
I have 2 workbooks where the first 3 columns of each row (after a title
row)
consist of an ID number, a North coordinate and an East Coordinate.
Workbook
A is complete in that every ID for our system is included along with the
coresponding North and East coords.
Workbook B includes a subset of the IDs and only some of the IDs have
their
coords in columns B and C. How do I import the coords into Workbook B
without having to copy/paste a thousand or more times. Thanks in advance
for
any help.






All times are GMT +1. The time now is 08:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com