View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Birley Dave Birley is offline
external usenet poster
 
Posts: 171
Default SUM() cells by variables

Kewl!! I'll give that dude a shot too -- the first one worked with
qualifications -- except the qualifications had nothing to do with YOUR
contribution <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC


"Norman Jones" wrote:

Hi Dave,

Alternatively, depending on your intended target cell, try:

'=============
Public Sub Tester()
Dim myWorkCell As Range
Dim myCount As Long

Set myWorkCell = Range("A1")
myCount = 5

myWorkCell.Offset(myCount, 17) = _
Application.Sum(myWorkCell(2, 13).Resize(myCount))
End Sub
'<<=============


---
Regards,
Norman