Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this should be simple, but my FindNext line is causing an error; any
suggestions? on the wroksheets("Sheet1") is entered: TotalHousemateUtility(A1); the value of A1 is a string Public Function TotalHousemateUtility(Name) Dim firstAddress Dim c As Range Dim subTotal as Single subTotal = 0 With Worksheets("Sheet 2").Range("B3:B10") Set c = .Find(Name, LookIn:=xlValues) If Not c Is Nothing Then firstAddress = c.Address Do subTotal = subTotal + Worksheets("Tally Sheet").Range(c.Address).Offset(0, 2).Value Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address < firstAddress End If End With TotalHousemateUtility = subTotal End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
Findnext | Excel Discussion (Misc queries) | |||
FindNext problem when using PasteSpecial | Excel Programming | |||
problem with .FindNext | Excel Programming |