Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
placing calculation based on two sum fields in loop
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
placing people into age groups based on their DOB | Excel Worksheet Functions | |||
Getting fields from DAO database and placing them in variables | Excel Programming | |||
Calculated Fields Based on Running Total Fields? | Excel Programming | |||
Calculated Fields Based on Running Total Fields? | Excel Programming | |||
Rookie question: placing a value into one cell based on a forrmula in another | Excel Programming |