PDA

View Full Version : Pulling data from other excel file



wakwak1
01-07-2008, 01:55 PM
I've got two .xls files (call them form.xls and data.xls). In column B of form.xls, I need it to search in column P of data.xls where it will be looking for a certain time value, say 3:00:00 PM. When it finds this time value, it needs to fetch a number from column T of data.xls (let's say it was from T20). That number will then be inputted in cell B3 of form.xls. In addition, cell C3 of form.xls will take the value of the number in T19 of data.xls, D3(form) and T18(data), E3(form) and T17(data) etc, and so on up to K3 and T11. Then L3 will correspond with T6 (i.e. we skipped 5 from T11) and M3 with T(-13) *** [This is just to illustrate the relationship, negative rows don't exist].

The macro will keep searching for further instances of 3:00:00 PM and put successive matches in B4,B5, etc. whilst following the rules described previously (fetching the associated numbers, etc). To top it all off, when the macro finds the 3:00:00 PM value in column P of data.xls, it would be nice if it could also pull the date which is in the same row but in column O (of data.xls). Then the A column in form.xls would be populated with the matching date values.

So it boils down to searching one .xls for a certain date, fetching associated data and then pulling that data back into a different .xls

I'd appreciate any input or provide any further clarification. Thanks!!!