K
Kim
I have a spreadsheet that calculates profit by customer by grade. I have
over 1000 customers that I want to use this calculation on. I created the
macro but now I want to have the macro go to the next row and next until all
1000 have been calculated. How do I make it so the macro loops to the next
then the next etc.
Below is the macro that needs to run for each row.
Please help.!!!
thanks
Sheets("Calc").Select
Range("B5").Select
ActiveCell.FormulaR1C1 = "='Customer List'!R[12]C[2]"
Range("B6").Select
ActiveCell.FormulaR1C1 = "='Customer List'!R[11]C[3]*1000"
Range("G4").Select
ActiveCell.FormulaR1C1 = "='Customer List'!R[13]C[1]"
Range("K4").Select
ActiveCell.FormulaR1C1 = "='Customer List'!R[13]C[-4]"
Range("K5").Select
ActiveWindow.SmallScroll Down:=45
Range("M75:N75").Select
Selection.Copy
Sheets("Customer List").Select
Range("J17").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Style = "Comma"
over 1000 customers that I want to use this calculation on. I created the
macro but now I want to have the macro go to the next row and next until all
1000 have been calculated. How do I make it so the macro loops to the next
then the next etc.
Below is the macro that needs to run for each row.
Please help.!!!
thanks
Sheets("Calc").Select
Range("B5").Select
ActiveCell.FormulaR1C1 = "='Customer List'!R[12]C[2]"
Range("B6").Select
ActiveCell.FormulaR1C1 = "='Customer List'!R[11]C[3]*1000"
Range("G4").Select
ActiveCell.FormulaR1C1 = "='Customer List'!R[13]C[1]"
Range("K4").Select
ActiveCell.FormulaR1C1 = "='Customer List'!R[13]C[-4]"
Range("K5").Select
ActiveWindow.SmallScroll Down:=45
Range("M75:N75").Select
Selection.Copy
Sheets("Customer List").Select
Range("J17").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Style = "Comma"