Hi
I'm trying to figure out code to copy and paste a set of formulas across a bunch of columns and then down to the end of the range. I can figure out that part with VBA, but I can't figure out how to set the formulas so that the cell references don't get messed up in VBA.
It's just a simple COUNTIFS and SUMIFS formulas but the column references need to stay and some sell references need to move either right or down.
=COUNTIFS('Order Export'!$B:$B,'Customer List'!$A2,'Order Export'!$L:$L,'Customer List'!K$1)
So that when the macro moves the formula over to cover 5 columns, the $B:$B/$L:$L stay the same but A2 will also stay the same for the row, but change to A3 in the next and K1 will become L1, M1, N1,O1... and next year when 2019 data is entered the new column P will have the formula...
I want to use some type of autofill with dynamic range script to move the formulas and the corresponding references over.
Any thoughts??
I'm trying to figure out code to copy and paste a set of formulas across a bunch of columns and then down to the end of the range. I can figure out that part with VBA, but I can't figure out how to set the formulas so that the cell references don't get messed up in VBA.
It's just a simple COUNTIFS and SUMIFS formulas but the column references need to stay and some sell references need to move either right or down.
=COUNTIFS('Order Export'!$B:$B,'Customer List'!$A2,'Order Export'!$L:$L,'Customer List'!K$1)
So that when the macro moves the formula over to cover 5 columns, the $B:$B/$L:$L stay the same but A2 will also stay the same for the row, but change to A3 in the next and K1 will become L1, M1, N1,O1... and next year when 2019 data is entered the new column P will have the formula...
I want to use some type of autofill with dynamic range script to move the formulas and the corresponding references over.
Any thoughts??