girapas
Board Regular
- Joined
- Apr 20, 2004
- Messages
- 150
That's correct:
I've a book per month (say JAN2012, FEB2012 etc.). Each book has sheets, one for every workday (say day1, day2, day3 etc.) where I put data as follows:
book: JAN2012
In another book (book2) I've a sheet named 'database':
book2
How to run a macro in book2, to get the next date from sheet 'database', column A, look up for that in the book with the same month-year (JAN2012, FEB2012 etc.), in sheet with the same date, pick up the values for AAA/X1,X2,X3 and BBB/X1,X2,X3 and put them in corresponding cells of 'database'?
I've a book per month (say JAN2012, FEB2012 etc.). Each book has sheets, one for every workday (say day1, day2, day3 etc.) where I put data as follows:
book: JAN2012
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | date: | 2/1/2012 | ||||
2 | X1 | X2 | X3 | |||
3 | AAA | 3296 | 2899 | 9803 | ||
4 | BBB | 7534 | 1991 | 3895 | ||
day1 |
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | date: | 3/1/2012 | ||||
2 | X1 | X2 | X3 | |||
3 | AAA | 6541 | 3403 | 2126 | ||
4 | BBB | 5996 | 1895 | 8919 | ||
day2 |
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | date: | 4/1/2012 | ||||
2 | X1 | X2 | X3 | |||
3 | AAA | 5754 | 4729 | 1230 | ||
4 | BBB | 5388 | 4798 | 6289 | ||
day3 |
In another book (book2) I've a sheet named 'database':
book2
Book1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | ---- | AAA | ---- | ---- | BBB | ---- | |||
2 | date | X1 | X2 | X3 | X1 | X2 | X3 | ||
3 | 2/1/2012 | ||||||||
4 | 3/1/2012 | ||||||||
5 | 4/1/2012 | ||||||||
6 | 5/1/2012 | ||||||||
7 | 9/1/2012 | ||||||||
8 | 10/1/2012 | ||||||||
9 | 11/1/2012 | ||||||||
10 | 12/1/2012 | ||||||||
11 | etc. | ||||||||
database |
How to run a macro in book2, to get the next date from sheet 'database', column A, look up for that in the book with the same month-year (JAN2012, FEB2012 etc.), in sheet with the same date, pick up the values for AAA/X1,X2,X3 and BBB/X1,X2,X3 and put them in corresponding cells of 'database'?
Last edited: