Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 193
Default Using sumif with subtotal

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 193
Default Using sumif with subtotal

To give a further idea of what I'm attempting to achieve:

=sumif(c3:c191,"Lights",subtotal(9,d3:d191)) - doesn't work.

I use Excel 2007.
--
Kind regards, Robert


"Robert" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Using sumif with subtotal

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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 193
Default Using sumif with subtotal

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




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Using sumif with subtotal

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








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 193
Default Using sumif with subtotal

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






  #7   Report Post  
Posted to microsoft.public.excel.misc
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








  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 193
Default Using sumif with subtotal

Presently we have dealt with data in columns B and C. There is additional
data in columns D and beyond. What I am attempting to find out is what the
formula would be for cells D and so on? What part of the Formula changes as
it is copied across the spreadsheet? I realise that certain parts of the
formula will remian absolute.

Thanks.
--
Kind regards, Robert


"T. Valko" wrote:

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









  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Using sumif with subtotal

Oh, OK!

If you want to sum column C, D, E, F, etc., just make the reference to
column B absolute and the reference to the sum column relative:

=SUMPRODUCT(SUBTOTAL(3,OFFSET($B2:$B12,ROW($B2:$B1 2)-ROW($B2),0,1)),($B2:$B12="Lights")+($B2:$B12="Sola r"),C2:C12)

--
Biff
Microsoft Excel MVP


"Robert" wrote in message
...
Presently we have dealt with data in columns B and C. There is additional
data in columns D and beyond. What I am attempting to find out is what the
formula would be for cells D and so on? What part of the Formula changes
as
it is copied across the spreadsheet? I realise that certain parts of the
formula will remian absolute.

Thanks.
--
Kind regards, Robert


"T. Valko" wrote:

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











Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumif / subtotal / something else? NeedToKnow Excel Discussion (Misc queries) 6 January 17th 09 01:19 AM
Subtotal and sumif help Ellen G. Excel Discussion (Misc queries) 1 November 9th 06 04:32 PM
subtotal and sumif Pete Excel Worksheet Functions 2 June 30th 06 01:46 PM
Sumif & subtotal Blackwar Excel Discussion (Misc queries) 5 December 8th 05 01:11 PM
Subtotal on SumIf Steven Excel Worksheet Functions 1 May 26th 05 12:25 AM


All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"