#1   Report Post  
Posted to microsoft.public.excel.misc
sumitk
 
Posts: n/a
Default Help with SUMIF

Hi. I need to be able to do a summary report where I need to add all the
numbers if the row and column headers both meet certain criteria. For
example, in the table below, I would like to get a value for the combination
Cat/White (i.e. 5+35 = 40) or Dog/Brown (i.e. 30)

Row/Col. A B C D
1 Animal/Color White Black Brown
2 Cat 5 10 15
3 Dog 20 25 30
4 Cat 35 40 45

In this particular situation, I do not want to use a pivot table. I did
something like this a while ago using a formula but cant seem to recall it
anymore. Any suggestions would be greatly appreciated. Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default Help with SUMIF

in Cell A6 enter Cat - White
in B6 enter =sumif($A$2:$A$4,"Cat",B2:B4)
HTH


"sumitk" wrote:

Hi. I need to be able to do a summary report where I need to add all the
numbers if the row and column headers both meet certain criteria. For
example, in the table below, I would like to get a value for the combination
Cat/White (i.e. 5+35 = 40) or Dog/Brown (i.e. 30)

Row/Col. A B C D
1 Animal/Color White Black Brown
2 Cat 5 10 15
3 Dog 20 25 30
4 Cat 35 40 45

In this particular situation, I do not want to use a pivot table. I did
something like this a while ago using a formula but cant seem to recall it
anymore. Any suggestions would be greatly appreciated. Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
sumitk
 
Posts: n/a
Default Help with SUMIF

Thanks Jim. My apologies but I should have mentioned earlier that the order
of the values in the row & col. headings could be random.. in other words,
White could be in col. C vs B the next time I do a data dump from the source
system. Same applies to the Values in Col. A as well.

Regards,
Sumitk

"Jim May" wrote:

in Cell A6 enter Cat - White
in B6 enter =sumif($A$2:$A$4,"Cat",B2:B4)
HTH


"sumitk" wrote:

Hi. I need to be able to do a summary report where I need to add all the
numbers if the row and column headers both meet certain criteria. For
example, in the table below, I would like to get a value for the combination
Cat/White (i.e. 5+35 = 40) or Dog/Brown (i.e. 30)

Row/Col. A B C D
1 Animal/Color White Black Brown
2 Cat 5 10 15
3 Dog 20 25 30
4 Cat 35 40 45

In this particular situation, I do not want to use a pivot table. I did
something like this a while ago using a formula but cant seem to recall it
anymore. Any suggestions would be greatly appreciated. Thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.misc
sumitk
 
Posts: n/a
Default Help with SUMIF

Also, the only thing I remember using in the past is a "SumProduct" formula.

sk

"sumitk" wrote:

Thanks Jim. My apologies but I should have mentioned earlier that the order
of the values in the row & col. headings could be random.. in other words,
White could be in col. C vs B the next time I do a data dump from the source
system. Same applies to the Values in Col. A as well.

Regards,
Sumitk

"Jim May" wrote:

in Cell A6 enter Cat - White
in B6 enter =sumif($A$2:$A$4,"Cat",B2:B4)
HTH


"sumitk" wrote:

Hi. I need to be able to do a summary report where I need to add all the
numbers if the row and column headers both meet certain criteria. For
example, in the table below, I would like to get a value for the combination
Cat/White (i.e. 5+35 = 40) or Dog/Brown (i.e. 30)

Row/Col. A B C D
1 Animal/Color White Black Brown
2 Cat 5 10 15
3 Dog 20 25 30
4 Cat 35 40 45

In this particular situation, I do not want to use a pivot table. I did
something like this a while ago using a formula but cant seem to recall it
anymore. Any suggestions would be greatly appreciated. Thanks in advance.

  #5   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default Help with SUMIF

Off hand, I can't help you on this -- the Sumproduct is an array-type
formula which oftern(if not always) requires the same number of
rows for each element yu are querying.
Sorry, perhaps someone else can assist you.
Jim

"sumitk" wrote:

Also, the only thing I remember using in the past is a "SumProduct" formula.

sk

"sumitk" wrote:

Thanks Jim. My apologies but I should have mentioned earlier that the order
of the values in the row & col. headings could be random.. in other words,
White could be in col. C vs B the next time I do a data dump from the source
system. Same applies to the Values in Col. A as well.

Regards,
Sumitk

"Jim May" wrote:

in Cell A6 enter Cat - White
in B6 enter =sumif($A$2:$A$4,"Cat",B2:B4)
HTH


"sumitk" wrote:

Hi. I need to be able to do a summary report where I need to add all the
numbers if the row and column headers both meet certain criteria. For
example, in the table below, I would like to get a value for the combination
Cat/White (i.e. 5+35 = 40) or Dog/Brown (i.e. 30)

Row/Col. A B C D
1 Animal/Color White Black Brown
2 Cat 5 10 15
3 Dog 20 25 30
4 Cat 35 40 45

In this particular situation, I do not want to use a pivot table. I did
something like this a while ago using a formula but cant seem to recall it
anymore. Any suggestions would be greatly appreciated. Thanks in advance.



  #6   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default Help with SUMIF

All I can come up with (in thinking through this) is that
you create yourself a standard Block (as Below) including
for example where the 65.00 is:

=SUMIF($A$2:$A$7,$A12,B$2:B$7)
and copy to other figures in the block.

It will accomodate what you need as long as the
Range is set right.



Summary White Black Brown
Cat 65.00 105.00 120.00
Dog 45.00 75.00 90.00
110.00 180.00 210.00


"Jim May" wrote:

Off hand, I can't help you on this -- the Sumproduct is an array-type
formula which oftern(if not always) requires the same number of
rows for each element yu are querying.
Sorry, perhaps someone else can assist you.
Jim

"sumitk" wrote:

Also, the only thing I remember using in the past is a "SumProduct" formula.

sk

"sumitk" wrote:

Thanks Jim. My apologies but I should have mentioned earlier that the order
of the values in the row & col. headings could be random.. in other words,
White could be in col. C vs B the next time I do a data dump from the source
system. Same applies to the Values in Col. A as well.

Regards,
Sumitk

"Jim May" wrote:

in Cell A6 enter Cat - White
in B6 enter =sumif($A$2:$A$4,"Cat",B2:B4)
HTH


"sumitk" wrote:

Hi. I need to be able to do a summary report where I need to add all the
numbers if the row and column headers both meet certain criteria. For
example, in the table below, I would like to get a value for the combination
Cat/White (i.e. 5+35 = 40) or Dog/Brown (i.e. 30)

Row/Col. A B C D
1 Animal/Color White Black Brown
2 Cat 5 10 15
3 Dog 20 25 30
4 Cat 35 40 45

In this particular situation, I do not want to use a pivot table. I did
something like this a while ago using a formula but cant seem to recall it
anymore. Any suggestions would be greatly appreciated. Thanks in advance.

  #7   Report Post  
Posted to microsoft.public.excel.misc
PaulW
 
Posts: n/a
Default Help with SUMIF

in B6 enter =sumif($A$2:$A$4,"Cat",B2:B4)

Row/Col. A B C D
1 Animal/Color White Black Brown
2 Cat 5 10 15
3 Dog 20 25 30
4 Cat 35 40 45


=sumif($A$2:A$4,"Cat",B2:B4)

Will work in the current table. If White is going to move, put something in
to search for "White", what I do is =match("White",1:1,0) which in this case
will return 2. I know its not ideal, but I then have a little table with a
Column as the numbers counting, and another as Letters running. Then do a
Vlookup of this Match, so that 2 becomes B.

Say this vlookup graph is in A50:B100, then =vlookup(2,A50:B100,2,FALSE)
Adding the match into this it becomes,
=vlookup(match("White",1:1,0),A50:B100,2,FALSE)
Concatenate will change this to
=concatenate(vlookup(match("White",1:1,0),A50:B100 ,2,FALSE),":",vlookup(match("White",1:1,0),A50:B10 0,2,FALSE))
Which in this case will return B:B

Using indirect to use this
sumif($A$2:A$4,"Cat",indirect(concatenate(vlookup( match("White",1:1,0),$A$50:$B$100,2,FALSE),":",vlo okup(match("White",1:1,0),$A$50:$B$100,2,FALSE))))

If you wanted these results to be in say G1, you could put White in H1,
Black in I1 and Brown in J1, in G2 put "Cat" and in G3 put "Dog". Copy the
above formula into H1, and change the Cat and Whites to cell references, so
it ends up as

=sumif($A$2:A$4,$G2,indirect(concatenate(vlookup(m atch(H$1,1:1,0),$A$50:$B$100,2,FALSE),":",vlookup( match(H$1,1:1,0),$A$50:$B$100,2,FALSE))))

You can then drag this formula into the other cells for this summary.

Even if this isn't exactly what you want, hopefully it'll help you get there
:)
  #8   Report Post  
Posted to microsoft.public.excel.misc
sumitk
 
Posts: n/a
Default Help with SUMIF

Thanks Paul & Jim. I think I finally have this working.

Regards,
Sumit

"PaulW" wrote:

in B6 enter =sumif($A$2:$A$4,"Cat",B2:B4)


Row/Col. A B C D
1 Animal/Color White Black Brown
2 Cat 5 10 15
3 Dog 20 25 30
4 Cat 35 40 45


=sumif($A$2:A$4,"Cat",B2:B4)

Will work in the current table. If White is going to move, put something in
to search for "White", what I do is =match("White",1:1,0) which in this case
will return 2. I know its not ideal, but I then have a little table with a
Column as the numbers counting, and another as Letters running. Then do a
Vlookup of this Match, so that 2 becomes B.

Say this vlookup graph is in A50:B100, then =vlookup(2,A50:B100,2,FALSE)
Adding the match into this it becomes,
=vlookup(match("White",1:1,0),A50:B100,2,FALSE)
Concatenate will change this to
=concatenate(vlookup(match("White",1:1,0),A50:B100 ,2,FALSE),":",vlookup(match("White",1:1,0),A50:B10 0,2,FALSE))
Which in this case will return B:B

Using indirect to use this
sumif($A$2:A$4,"Cat",indirect(concatenate(vlookup( match("White",1:1,0),$A$50:$B$100,2,FALSE),":",vlo okup(match("White",1:1,0),$A$50:$B$100,2,FALSE))))

If you wanted these results to be in say G1, you could put White in H1,
Black in I1 and Brown in J1, in G2 put "Cat" and in G3 put "Dog". Copy the
above formula into H1, and change the Cat and Whites to cell references, so
it ends up as

=sumif($A$2:A$4,$G2,indirect(concatenate(vlookup(m atch(H$1,1:1,0),$A$50:$B$100,2,FALSE),":",vlookup( match(H$1,1:1,0),$A$50:$B$100,2,FALSE))))

You can then drag this formula into the other cells for this summary.

Even if this isn't exactly what you want, hopefully it'll help you get there
:)

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
How to use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
Sumif of Sumif perhaps? Fred Excel Discussion (Misc queries) 2 March 29th 06 05:39 PM
SUMIF Ferg Excel Worksheet Functions 3 February 28th 06 03:37 AM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
SUMIF with Mutiple Ranges & Criteria PokerZan Excel Discussion (Misc queries) 5 August 4th 05 10:31 PM


All times are GMT +1. The time now is 05:17 AM.

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"