PC Review


Reply
Thread Tools Rate Thread

2 level subtotal result weird

 
 
HFLo
Guest
Posts: n/a
 
      30th Nov 2009
refer to below sample.
I do a subtotal on column ID1, then subtotal again on ID2.
the result looks weird:
row 11 shows b total and row 12 shows y total, it should be the other way
round.
same apply to row 16 (c total) and row 17 (y total) etc.

pls advice. thanks !
>>>

ID1 ID2 amt
a x 1
b x 2
b x 3
b x 4
b y 5
b y 6
c x 7
c y 8
d x 9
d y 10


 
Reply With Quote
 
 
 
 
Ms-Exl-Learner
Guest
Posts: n/a
 
      30th Nov 2009
If you want to Total the C1 to C11 values based on two criteria that is the
text “B” in A1 to A11 and the text “Y” in B1 to B11 then use the below one:
=SUMPRODUCT((A1:A11="B")*(B1:B11="Y"),(C1:C11))

The below one will check the character B in A1:A11 and character X in B1:B11
and get the total from C1:C11
=SUMPRODUCT((A1:A11="B")*(B1:B11="X"),(C1:C11))

Like the above change the text in the above formula to get your desired data.

Instead of mentioning the value in the formula you can refer it on some
other cell and get the data by mentioning the values in the particular cells.
See the below one
=SUMPRODUCT((A1:A11=D1)*(B1:B11=E1),(C1:C11))
Now Mention the Text in D1 and E1 to get the totals.

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"HFLo" wrote:

> refer to below sample.
> I do a subtotal on column ID1, then subtotal again on ID2.
> the result looks weird:
> row 11 shows b total and row 12 shows y total, it should be the other way
> round.
> same apply to row 16 (c total) and row 17 (y total) etc.
>
> pls advice. thanks !
> >>>

> ID1 ID2 amt
> a x 1
> b x 2
> b x 3
> b x 4
> b y 5
> b y 6
> c x 7
> c y 8
> d x 9
> d y 10
>
>

 
Reply With Quote
 
Jim Thomlinson
Guest
Posts: n/a
 
      30th Nov 2009
What you have described is the default behaviour of subtotals. Since ID2 is
your second subtotal it shows up after (below) ID1. If I was doing that I
would have used a pivot table to render this...

Sum of amt
ID1 ID2 Total
a x 1
a Total 1
b x 9
y 11
b Total 20
c x 7
y 8
c Total 15
d x 9
y 10
d Total 19
Grand Total 55


Which I think is in line with what you want...
--
HTH...

Jim Thomlinson


"HFLo" wrote:

> refer to below sample.
> I do a subtotal on column ID1, then subtotal again on ID2.
> the result looks weird:
> row 11 shows b total and row 12 shows y total, it should be the other way
> round.
> same apply to row 16 (c total) and row 17 (y total) etc.
>
> pls advice. thanks !
> >>>

> ID1 ID2 amt
> a x 1
> b x 2
> b x 3
> b x 4
> b y 5
> b y 6
> c x 7
> c y 8
> d x 9
> d y 10
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtotal level buttons easton Microsoft Excel Worksheet Functions 0 11th Dec 2009 05:49 PM
level buttons not visible for subtotal Gerry Microsoft Excel Misc 2 5th Nov 2008 07:07 PM
Redundant Subtotal Level =?Utf-8?B?a21iYXJ6?= Microsoft Excel Programming 1 29th Jun 2005 07:28 PM
Multiple Level Subtotal Problem =?Utf-8?B?c3RhbnNob2U=?= Microsoft Excel Programming 2 4th Jan 2005 12:07 AM
Need to filter a spreadsheet at the SUBTOTAL level. UNCLE WALT Microsoft Excel Misc 2 21st Aug 2003 08:30 PM


Features
 

Advertising
 

Newsgroups
 


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