Hello.
First of all thank you that you are willing to help. This is much appreciated!
I am new to Excel (but I know how to apply macros) so please excuse the fact that I don't express my mind with a proper technical terminalogy.
English isn't my native language. Hopefully you will understand what I am trying to achieve. I will explain it as detailed as possible but please ask me if in doubt.
I have 2 excel spreadsheets. LabData.xls and Review.xls
I want to copy cells from LabData.xls selection is: D1 to CI1 ; D2 to CI2 ; D3 to CI3 => $D$1:$CI$3 => Selection contains 3rows and 84 columns.
And paste it accordingly to Review.xls B5 cell which will fill everything from B5 to CG5 ; B6 to CG6 ; B7 to CG7 => $B$5:$CG$7 The same number of cells, same order - 84 columns x 3 rows.
The paste point is to be changed upon Date variaty. I want the copy selection cells be always the same $D$1:$CI$3 LabData.xls but paste point is different. B5, B9, B13 etc B(X+4) Review.xls depending on Date:
In LabData.xls I have a cell which indicates the Date of report data = LabData.xls cell B4. In Review.xls I have a coresponding date cell which is either A4,A8,A12 etc A(X+4)
Lets say that 1st of December is A4 (just for example), 2nd of December is A8, 3rd = A12 etc in Review.xls. If LabData.xls B4 cell is indicating 1st of December then Paste the selection to B5 of Review.xls. If LabData.xls B4 cell is 2nd of December then Paste it to B9 of Review.xls.
Basically I want the macro to compare LabData.xls B4 cell with A4,A8,A12,A16,A(X+4) cells of Review.xls and if Date in B4 cell of LabData.xls is equal to one of A(X+4) cells in Review.xls then paste it accordingly to B5, B9, B13 etc.
For example in LabData.xls B4 cell is 4th of December (which is equal to A16 Review.xls), then copy $D$1:$CI$3 LabData.xls and paste it to B17 Review.xls which will fill all cells $B$17:$CG$20 because B4 LabData.xls = A16 Review.xls
If cell B4 LabData.xls is equal to cell A80 Review.xls then copy $D$1:$CI$3 LabData.xls and paste it to cell B81 Review.xls ($B$81:$CG$84)
If cell B4 LabData.xls is equal to A224 Review.xls then copy $D$1:$CI$3 LabData.xls and paste it to B225 Review.xls ($B$225:$CG$228)
Dates in Review.xls aren't constants. One day cell A4 Review.xls can be 1st of December, the other day it can be 4th of July. Macro should understand it.
BIG THANKS IN ADVANCE!
First of all thank you that you are willing to help. This is much appreciated!
I am new to Excel (but I know how to apply macros) so please excuse the fact that I don't express my mind with a proper technical terminalogy.
English isn't my native language. Hopefully you will understand what I am trying to achieve. I will explain it as detailed as possible but please ask me if in doubt.
I have 2 excel spreadsheets. LabData.xls and Review.xls
I want to copy cells from LabData.xls selection is: D1 to CI1 ; D2 to CI2 ; D3 to CI3 => $D$1:$CI$3 => Selection contains 3rows and 84 columns.
And paste it accordingly to Review.xls B5 cell which will fill everything from B5 to CG5 ; B6 to CG6 ; B7 to CG7 => $B$5:$CG$7 The same number of cells, same order - 84 columns x 3 rows.
The paste point is to be changed upon Date variaty. I want the copy selection cells be always the same $D$1:$CI$3 LabData.xls but paste point is different. B5, B9, B13 etc B(X+4) Review.xls depending on Date:
In LabData.xls I have a cell which indicates the Date of report data = LabData.xls cell B4. In Review.xls I have a coresponding date cell which is either A4,A8,A12 etc A(X+4)
Lets say that 1st of December is A4 (just for example), 2nd of December is A8, 3rd = A12 etc in Review.xls. If LabData.xls B4 cell is indicating 1st of December then Paste the selection to B5 of Review.xls. If LabData.xls B4 cell is 2nd of December then Paste it to B9 of Review.xls.
Basically I want the macro to compare LabData.xls B4 cell with A4,A8,A12,A16,A(X+4) cells of Review.xls and if Date in B4 cell of LabData.xls is equal to one of A(X+4) cells in Review.xls then paste it accordingly to B5, B9, B13 etc.
For example in LabData.xls B4 cell is 4th of December (which is equal to A16 Review.xls), then copy $D$1:$CI$3 LabData.xls and paste it to B17 Review.xls which will fill all cells $B$17:$CG$20 because B4 LabData.xls = A16 Review.xls
If cell B4 LabData.xls is equal to cell A80 Review.xls then copy $D$1:$CI$3 LabData.xls and paste it to cell B81 Review.xls ($B$81:$CG$84)
If cell B4 LabData.xls is equal to A224 Review.xls then copy $D$1:$CI$3 LabData.xls and paste it to B225 Review.xls ($B$225:$CG$228)
Dates in Review.xls aren't constants. One day cell A4 Review.xls can be 1st of December, the other day it can be 4th of July. Macro should understand it.
BIG THANKS IN ADVANCE!