Horizontal Subtotals?

mgirvin

Well-known Member
Joined
Dec 15, 2005
Messages
1,236
Office Version
  1. 365
Platform
  1. Windows
Dear Smartest Excelers In The World,

The Subtotal feature works vertically. Is there a way to do it horizontally?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Can you post some sample data so we can see how the Subtotals might be arranged?
lenze
 
Upvote 0
Hello mgirvin,

for my proposal you need a helprow and you have to define a name as follows:

Here is the list with all columns visible:
Excel Workbook
ABCDEF
15555525
244444Helprow
Sheet
#VALUE!
</td></tr></table></td></tr></table>

After hiding/unhiding colums the result in cell F1 is refreshed after pressing F9:
Excel Workbook
ABEF
155515
2444Helprow
Sheet
#VALUE!
</td></tr></table></td></tr></table>

May be you have to change the words "Zelle" to "cell", and "Breite" to "Width" in the formula defining the name. I cannot show that because I'm using German Excel.
 
Last edited:
Upvote 0
Dear lenze and Beate Schmitz,

Sorry I did not post back sooner – I asked the question and then was delayed in getting back to check for an answer. Actually, all I was asking was if there was a way to get the Subtotal feature to work horizontally.

As for data setup, I have field names in F1:F3, data in cells G1:AL4, row one is sorted, and row 3 has the numbers to sum. So in row 4 for Subtotals I have used the formula:

=IF(G1<>H1,SUMPRODUCT($G$3:$AL$3,--($G$1:$AL$1=G1)),"")

And this works fine, I was just wondering if Subtotals feature would automate the process.

As for the CELL &"width" formula setup, that is quite a clever trick. I have not seen CELL and “width” used in such a way before. That is a good one for my Excel Toolbox!
 
Upvote 0
... So in row 4 for Subtotals I have used the formula:

=IF(G1<>H1,SUMPRODUCT($G$3:$AL$3,--($G$1:$AL$1=G1)),"")

I meant to say:

... So in row 4 for Subtotals I have used the formula:

=IF(G1<>H1,SUMIF($G$1:$AL$1,G1,$G$3:$AL$3),"")
 
Upvote 0

Forum statistics

Threads
1,214,631
Messages
6,120,645
Members
448,974
Latest member
DumbFinanceBro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top