Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
placing people into age groups based on their DOB JSAUS Excel Worksheet Functions 3 March 17th 10 02:42 PM
Getting fields from DAO database and placing them in variables parkin_m Excel Programming 2 August 8th 07 01:22 PM
Calculated Fields Based on Running Total Fields? Kruncher Excel Programming 0 May 12th 06 06:40 PM
Calculated Fields Based on Running Total Fields? Kruncher Excel Programming 0 May 12th 06 06:18 PM
Rookie question: placing a value into one cell based on a forrmula in another Kelley[_2_] Excel Programming 2 November 1st 03 09:50 PM


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"