ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Run macro to find names on seperate workbook, then add info from t (https://www.excelbanter.com/excel-discussion-misc-queries/78890-run-macro-find-names-seperate-workbook-then-add-info-t.html)

Tim

Run macro to find names on seperate workbook, then add info from t
 

I have a report that needs data from another workbook to be put against the
names of people.

The names on my report are always the same and in the same order, but the
other workbook is updated each month, and the names will be in a different
order. From the second file i need three of the cells copying over to my
workbook, and i would like this to be done automatrically as there are about
150 names.

If i run a macroo to find the names, and then select he cells on that line,
it just selects the cell location, and when i do the next months it picks up
someone elses info as the cell location for that name had no changed.

Please help.

Rebecca

Run macro to find names on seperate workbook, then add info from t
 
Use the function VLookup to do this. In the first of the 4 fields in the
VLookup box, highlight the cell from the first worksheet that you want to
update (the name). In the second box, choose the range from the other
worksheet (make sure that the name that you want to look up is the first
column in that range). In the third box of VLookup, put the number of the
column after the name that you want to be in the other cell on the first
spreadsheet. In other words, if you have the name and then the address and
then the phone number and then the customer number and you want the address
in the cell which you are doing, then the number would be 2. The last box of
the VLookup is always FALSE.

"Tim" wrote:


I have a report that needs data from another workbook to be put against the
names of people.

The names on my report are always the same and in the same order, but the
other workbook is updated each month, and the names will be in a different
order. From the second file i need three of the cells copying over to my
workbook, and i would like this to be done automatrically as there are about
150 names.

If i run a macroo to find the names, and then select he cells on that line,
it just selects the cell location, and when i do the next months it picks up
someone elses info as the cell location for that name had no changed.

Please help.



All times are GMT +1. The time now is 01:16 PM.

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