Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]()
Just use
=SUBTOTAL(9,B:B) To show the filtered name, use Tome Ogilvy's great ShowFilter UDF, and add this to a cell =MID(showfilter(A1)&CHAR(SUBTOTAL(9,A2)*0+32),2,9) The UDF is Public Function ShowFilter(rng As Range) Dim filt As Filter Dim sCrit1 As String Dim sCrit2 As String Dim sop As String Dim lngOp As Long Dim lngOff As Long Dim frng As Range Dim sh As Worksheet Set sh = rng.Parent If sh.FilterMode = False Then ShowFilter = "No Active Filter" Exit Function End If Set frng = sh.AutoFilter.Range If Intersect(rng.EntireColumn, frng) Is Nothing Then ShowFilter = CVErr(xlErrRef) Else lngOff = rng.Column - frng.Columns(1).Column + 1 If Not sh.AutoFilter.Filters(lngOff).On Then ShowFilter = "No Conditions" Else Set filt = sh.AutoFilter.Filters(lngOff) On Error Resume Next sCrit1 = filt.Criteria1 sCrit2 = filt.Criteria2 lngOp = filt.Operator If lngOp = xlAnd Then sop = " And " ElseIf lngOp = xlOr Then sop = " or " Else sop = "" End If ShowFilter = sCrit1 & sop & sCrit2 End If End If End Function -- HTH RP (remove nothere from the email address if mailing direct) "Robert Christie" wrote in message ... Hi Small example of data Name Amount Paid Sheri $10.00 Yes Sheri $15.00 No Maureen $25.00 No Maureen $12.00 Yes If I AutoFilter the the list for Name "Sheri", how can I use the Subtotal and Sumif functions together to show an answer of $15.00? Or how can I use the Sumif or Sumproduct functions only on the visible cells? Plus is it possible to show the filtered name "Sheri" in a seperate cell? -- Thank you Regards Aussie Bob C. Using Windows XP Home + Office 2003 Pro |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Include Subtotal in SumIf | Excel Worksheet Functions | |||
SUMIF SUBTOTAL OR SUMPRODUCT? | Excel Worksheet Functions | |||
Subtotal on SumIf | Excel Worksheet Functions | |||
Combining SUMIF and SUBTOTAL functions | Excel Worksheet Functions | |||
Can you combined the SUMIF and SUBTOTAL functions in a formula? | Excel Worksheet Functions |