S
S Himmelrich
I've got the following code below working where it provides sum of
dataset. What I now need to do is divide numerator/denominator as a
calculation in cell 10...how to do?
With ActiveSheet
lfR = 1
For lcR = 1 To .Cells(.Rows.Count, "B").End(xlUp).Row + 1
If Len(Trim(.Cells(lcR, 1))) = 0 Then
.Cells(lcR, 1) = .Cells(lcR - 1, 2) '& "- Averages"
.Cells(lcR, 11).Formula = "=SUM(K" & lfR & ":K" & lcR - 1 & ")"
' divide this into
.Cells(lcR, 12).Formula = "=SUM(L" & lfR & ":L" & lcR - 1 & ")"
' THIS
' I would imaging the code would go here, but don't know the
correct syntax
lfR = lcR + 1
End If
Next
End With
dataset. What I now need to do is divide numerator/denominator as a
calculation in cell 10...how to do?
With ActiveSheet
lfR = 1
For lcR = 1 To .Cells(.Rows.Count, "B").End(xlUp).Row + 1
If Len(Trim(.Cells(lcR, 1))) = 0 Then
.Cells(lcR, 1) = .Cells(lcR - 1, 2) '& "- Averages"
.Cells(lcR, 11).Formula = "=SUM(K" & lfR & ":K" & lcR - 1 & ")"
' divide this into
.Cells(lcR, 12).Formula = "=SUM(L" & lfR & ":L" & lcR - 1 & ")"
' THIS
' I would imaging the code would go here, but don't know the
correct syntax
lfR = lcR + 1
End If
Next
End With