View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Using sumif with subtotal

What about it?

How does it relate?

--
Biff
Microsoft Excel MVP


"Robert" wrote in message
...
Thanks Biff. Just one more if I may. What if there is numerical data in
adjacent cells (say, F, G and H, etc) that continue to the right?
--
Kind regards, Robert


"T. Valko" wrote:

Just remove the test for Lights:

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B2:B12,ROW(B2:B12)-ROW(B2),0,1)),--(B2:B12="Solar"),C2:C12)

And, if just want Lights:

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B2:B12,ROW(B2:B12)-ROW(B2),0,1)),--(B2:B12="Lights"),C2:C12)


--
Biff
Microsoft Excel MVP


"Robert" wrote in message
...
Thanks for your help thus far.

Now what if I just want solar? How would the formula loo please?
--
Kind regards, Robert


"T. Valko" wrote:

Try this:

Lights/Solar in column B
Amounts in column C

Full unfiltered range is B2:C12

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B2:B12,ROW(B2:B12)-ROW(B2),0,1)),(B2:B12="Lights")+(B2:B12="Solar"),C 2:C12)

--
Biff
Microsoft Excel MVP


"Robert" wrote in message
...
Lights 12,505.00
Solar 23,622.44
Lights 21,771.00
Solar 23,622.44
Lights 23,739.00
Solar 23,622.44
Lights 9,594.00
Solar 23,622.44

Using above data as example, how do I subtotal using sumif where
data
has
been filtered in a larger database? The filtered data base has
returned
data
that has already been correctly subtotalled using function_num 9.
This
list
now contains hidden rows. I now wish to further subtotal the list
using
criteria lights or solar in the sumif?
--
Kind regards, Robert