Can we filter / sort by a formula from Reference worksheets ?

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

In the summary page, there is a column containing data (with underlying
formula as shown below) from different worksheets:

Formula Value
=SUM('ABC'!K4:K7) 15
=SUM('ABC'!K8:K11) 25
='DEF STOCKS'!S4 30
='DEF STOCKS'!S5 30
=HIJ!J50 40
=SUM('ABC'!K20) 18
=SUM('ABC'!K20) 12


There is a requirement to add all value from worksheet ABC, 'DEF STOCKS',
HIJ. Is it possible for us to apply filter so that we can get a list as
follow:

ABC - 70 (i.e. 15 + 25 + 18 + 12)
DEF STOCKS - 60 (i.e. 30 + 30)
HIJ - 40

Thanks
 
Put this in a REGULAR module> on the sheet = gsffa("ABC!K") to sum all in
col K of abc sheet.

Function gsffa(mv As String)
For Each c In Range("m22:m28")
If InStr(c.Formula, mv) > 0 Then ms = ms + c
Next
gsffa = ms
End Function
 
Back
Top