Forum Discussion
technonot
Apr 04, 2020Copper Contributor
Excel SUM Function - Trying to Exclude Some Non-Contiguous Cells
I would like to Sum a column but exclude certain cells from that summing process, as they contain subtotals (so I do not want to add them twice). I have searched the web high and low and tried multiple formulas without success. The best I can get is a #VALUE! error. I know I've done this type of formula in the past with an earlier version of Excel, but cannot do it with this version (Office 10 Pro). Thanks.
Lost_inExcel I'm not entirely sure, without seeing what went wrong. If you could save and attach the file (or provide a screenshot), I could possibly offer something more concrete. What version of Excel are you using? The formulas I used will only work with Excel for MS365. This is what it looks like when I input $1 for all parts for Sup1:
Min Cost via Data Table
As long as you input any Row_ID with the lowest cost (1 thru 6) in cell F13, it should assign all 19 parts to Sup1.
6 Replies
Sort By
It's better to use SUBTOTAL() as
=SUBTOTAL(9,C5:C9)
for intermediate results and
=SUBTOTAL(9,C3:C18)
for grand total. Please check in attached file.
- technonotCopper Contributor
Also, I have never used the SUBTOTAL formula before. What is the 9 for in the formula?
- technonotCopper Contributor
Hi Sergei and thanks for your response, but when I open this doc in protected view on my computer, this is what I see (see attached) - a bunch of ###### signs in the Total column. Why??
Make the column wider , in protected view it doesn't expand automatically. It shall be as
9 means sum. Please check SUBTOTAL function