Calculate visible cells only?

  • Thread starter Thread starter Ken
  • Start date Start date
K

Ken

Excel2003 ...

Row 1 ... Cols D-E-F-G-H-I-J ... contain SUMIF Formula with Range (D4:D100)
changed for each respective Column. Works great when Rows not Filtered.

Cell D1 contains ... =SUMIF(D4:D100,">0",K4:K100)
Cell E1 contains ... = SUMIF(E4:E100,">0",K4:K100)
etc

Row 2 (same Cols) contains SUBTOTAL Formulas (no issue).

Row 3 contains my Filter Switches

Issue ... Is there a way to write formula in Row 1 so it too will only
return the value of the Filtered rows as does SUBTOTAL?

Thanks ... Kha
 
Enter this formula in D1 and copy across to J1:

=SUMPRODUCT(SUBTOTAL(2,OFFSET(D4:D100,ROW(D4:D100)-ROW(D4),0,1)),--(D4:D100>0),$K4:$K100)
 
Works exactly as requested ... Thank you ... Kha

T. Valko said:
Enter this formula in D1 and copy across to J1:

=SUMPRODUCT(SUBTOTAL(2,OFFSET(D4:D100,ROW(D4:D100)-ROW(D4),0,1)),--(D4:D100>0),$K4:$K100)
 

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

SUMIF? Or other? 2
Vlookup or Other vs Sort? 1
Filter Activated Conditional Formats? 1
Col to Rows Formula? 6
Help with formula 3
Formulas for Copying Down 3
Subtotal and IF Formula 1
Count only visible cells 4

Back
Top