-
Here are the finished samples for the SUMPRODUCT solution and also the repeated use of FIND...thanks to those that helped with this
SUMPRODUCT
=SUMPRODUCT(-(Sheet1!$B$4:$B$20=$B5),-(Sheet1!$A$4:$A$20=D$3),Sheet1!$D$4:$D$20)
Use of FIND
[VBA]Function lngNumberFound(strFieldValue As String) As Long
lngNumberFound = 0
With Worksheets("Sheet1").Range("a3:d20")
Set c = .Find(strFieldValue, LookIn:=xlValues)
If Not c Is Nothing Then
firstaddress = c.Address
Do
lngNumberFound = lngNumberFound + 1
Set c = .Find(c, After:=c)
Loop While Not c Is Nothing And c.Address <> firstaddress
End If
End With
End Function[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules