Here is the code that I am working on.
Range(Cells(11, Imult + 1), Cells(11, Imult + 1)).Value = "=sumif(Data!E:E, Results!A11, Data!N:N)"
Range(Cells(11, Imult + 2), Cells(11, Imult + 2)).Value = "=sumif(Data!E:E, Results!A11, Data!O:O)"
Range(Cells(11, Imult + 3), Cells(11, Imult + 3)).Value = "=B11/C11"
So the macro goes through the spreadsheet and fills in the formula for multiple columns. Each formula however needs to use different rows in the sumif formula.
for example.
The first set of data should have "=sumif(Data!E:E, Results!A11, Data!N:N)"
the next set of data should have "=sumif(Data!F:F, Results!F11, Data!N:N)"
the next set of data should have "=sumif(Data!G:G, Results!K11, Data!N:N)"
and so on.
The first part (Data!E:E) should increase by 1 every time.
The second part (Results!A11) should increase its row by 5 each time.
I would have no problem doing this using rows (with a couple loops) but I am unsure how to do this for the columns. I know the cell function allows you to use columns as numbers but how do I do this for the text that I am trying to paste into each cell?
Thanks for the help
Range(Cells(11, Imult + 1), Cells(11, Imult + 1)).Value = "=sumif(Data!E:E, Results!A11, Data!N:N)"
Range(Cells(11, Imult + 2), Cells(11, Imult + 2)).Value = "=sumif(Data!E:E, Results!A11, Data!O:O)"
Range(Cells(11, Imult + 3), Cells(11, Imult + 3)).Value = "=B11/C11"
So the macro goes through the spreadsheet and fills in the formula for multiple columns. Each formula however needs to use different rows in the sumif formula.
for example.
The first set of data should have "=sumif(Data!E:E, Results!A11, Data!N:N)"
the next set of data should have "=sumif(Data!F:F, Results!F11, Data!N:N)"
the next set of data should have "=sumif(Data!G:G, Results!K11, Data!N:N)"
and so on.
The first part (Data!E:E) should increase by 1 every time.
The second part (Results!A11) should increase its row by 5 each time.
I would have no problem doing this using rows (with a couple loops) but I am unsure how to do this for the columns. I know the cell function allows you to use columns as numbers but how do I do this for the text that I am trying to paste into each cell?
Thanks for the help