Specific cells: K4 and K8
Columns with data needed for formulas: A (values named devm), C (values named slice) and D (values named point)
Columns with formulas to go in: E, F and G (want to name these values angle, devmm and height)
Formula to go into E1: =(D1 - 1) * $K$8
Formula to go into F1: =A1 * 1000
Formula to go into G1: =(C1 - 1) * $K$4
^^^These are only with respect to Row 1
I want my macro to enter these formulas into these Row 1 cells and then autofill down to Last active Row (which I have already sorted the code out for). Relative part(s) of my code is below.
K = 1
ender = Tier * increment
last = LastTier * increment
starter = ender - (increment - 1)
If starter = 0 Then
starter = 1
End If
sheetname1 = "Sheet1"
ActiveSheet.Name = sheetname1
ActiveSheet.Range("K2") = TankHeight
ActiveSheet.Range("K3") = LastTier - 1
ActiveSheet.Range("K4").Formula = "=$K$2/$K$3"
ActiveSheet.Range("K6").Value = 360
ActiveSheet.Range("K7") = increment
ActiveSheet.Range("K8").Formula = "=$K$6/$K$7"
' ********************************************************************
Set Range1 = Range("A1:J65536")
With Range1
Rows(last + 2).Delete
End With
For K = starter To ender
Devm = ActiveSheet.Range("A" & K).Value
Rad = ActiveSheet.Range("B" & K).Value
slice = ActiveSheet.Range("C" & K).Value
point = ActiveSheet.Range("D" & K).Value
' ***Automation settings for Formulas and Autofill down to last***
ActiveSheet.Range("E1").Formula = "=(D1-1)*$K$8"
ActiveSheet.Range("F1").Formula = "=A1*1000"
ActiveSheet.Range("G1").Formula = "=(C1-1)*$K$4"
Angle = ActiveSheet.Range("E" & K).Value
Devmm = ActiveSheet.Range("F" & K).Value
height = ActiveSheet.Range("G" & K).Value
K = K + 1
ActiveSheet.Range("C1").Select
Next