Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, this is a function I use in one of my add-ins
Function vertSUM(aTable As Range, aCell As Range, Offset As Integer) As Double Dim tmp As Range Dim A As Long Set tmp = aTable.Find(aCell.Text, LookIn:=xlValues, Lookat:=xlWhole) If Not tmp Is Nothing Then A = tmp.Row Do vertSUM = vertSUM + tmp.Offset(, Offset).Value Set tmp = aTable.Find(aCell.Text, tmp, LookIn:=xlValues, Lookat:=xlWhole) If tmp Is Nothing Then Exit Function Loop While tmp.Row < A End If End Function ----------------------- A B 1 a =vertsum($A$7:$B$10;$A1;1) ' 2 3 4 5 6 ID VALUE 'values you can filter 7 a 2 8 b 2 9 a 2 10 b 2 Regards, ste |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting the number of unique values within a range | Excel Discussion (Misc queries) | |||
count unique values in a filtered range | Excel Worksheet Functions | |||
Unique values from date range | Excel Discussion (Misc queries) | |||
How do I get the unique values from a range? | Excel Worksheet Functions | |||
Display unique values in a range. | Excel Programming |