sum (column 2 of namedrange)

C

Carl Brehm

=(SUM(Onhand) totals all cells in the range onhand hidden or not
1. How do you sum just the unhidden
2. how to sum just column 2 of a range or 1 row of a range?

--
Carl & Linda Brehm
Lake Lafourche Bird House
Hebert, LA
Keets, Tiels, GN & Red Lories, Quakers
Mitred Conures, TAG's,DYH, Bourkes,
Cages, Toys, Toy parts Wholesale/Retail
Feed & Supplies
 
L

Leo Heuser

Carl

1. =SUBTOTAL(9, Onhand)
Be aware, that the formula only works, when the rows
have been hidden by *filtering*

2.
First column:
=SUM(OFFSET(E1:F6,0;0,,1))
Second column:
=SUM(OFFSET(E1:F6,0;1,,1))
etc.

First row:
=SUM(OFFSET(E1:F6,0;0,1,))
Second row:
=SUM(OFFSET(E1:F6,1;0,1,))
etc.


--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.
 
A

Alan Beban

Leo said:
Carl
2.
First column:
=SUM(OFFSET(E1:F6,0;0,,1)) :::blush:r =SUM(INDEX(E1:F6,0,1)
Second column:
=SUM(OFFSET(E1:F6,0;1,,1)) :::blush:r =SUM(INDEX(E1:F6,0,2)
etc.

First row:
=SUM(OFFSET(E1:F6,0;0,1,)) :::blush:r =SUM(INDEX(E1:F6,1,0)
Second row:
=SUM(OFFSET(E1:F6,1;0,1,)) :::blush:r =SUM(INDEX(E1:F6,2,0)
etc.

And the semicolon in Leo Heuser's formulas is a typo.

Alan Beban
 
L

Leo Heuser

Thanks, Alan!

To Carl:
And the missing righthand parenthesis in Alan's
formulae is a typo <g>

LeoH
 
C

Carl Brehm

Okay now why use index instead of offset. What are the advantages and
disadvantages of each way? Is there times when one is better than the other?


--
Carl & Linda Brehm
Lake Lafourche Bird House
Hebert, LA
Keets, Tiels, GN & Red Lories, Quakers
Mitred Conures, TAG's,DYH, Bourkes,
Cages, Toys, Toy parts Wholesale/Retail
Feed & Supplies
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Error 1004 help 4
Slow Response time 4
Sumif Help needed 3
.cells help 3
Changing color of cells 5
Range("Weekending").Cells.Columns.Count 4
Function to convert string 13
Hiding Blank lines in named range 3

Top