• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Improve or change a formula

Hello,
would you please help me to improve the following formula?

=IFERROR(SUMIF(TB!$A$7:$A$10000,$B6,INDEX(TB!$C$6:$P$10000,0,MATCH($F$3,TB!$C$5:$P$5,0))),"")

I need add one more MATCH cell $J$4, TB!$B$6:$B$2000.

Thank you.
 
Hello Bosco,
Your formula is working, but there is one issue. If I do not select any identifier in J4, I would like to get Total number(sum) from C6:p10000, based on selection of A... like I had in my formula before addition of J4.
 
tHIS WHAT i GOT: =-IFERROR(SUMIFS(INDEX(TB!$C$6:$P$10000,0,MATCH($D$3,TB!$C$5:$P$5,0)),TB!$A$6:$A$10000,$B9,TB!$B$6:$B$10000,$J$4),"")
BUT it shows "zero" instead of $4,000
 
Sorry, copied wrong cell:
.=-IF($J$4="",SUM(TB!$C$6:$P$10000),IFERROR(SUMIFS(INDEX(TB!$C$6:$P$10000,0,MATCH($D$3,TB!$C$5:$P$5,0)),TB!$A$6:$A$10000,$B8,TB!$B$6:$B$10000,$J$4),""))
 
Hello all,
Can anyone help to improve this formula?
=IF($J$4="",SUM(TB!$C$6:$P$10000),IFERROR(SUMIFS(INDEX(TB!$C$6:$P$10000,0,MATCH($D$3,TB!$C$5:$P$5,0)),TB!$A$6:$A$10000,$B8,TB!$B$6:$B$10000,$J$4),""))
It returns "zero" instead of $4,000.
Initially, I had this formula:

=IFERROR(SUMIF(TB!$A$7:$A$10000,$B6,INDEX(TB!$C$6:$P$10000,0,MATCH($F$3,TB!$C$5:$P$5,0))),"")

I needed to add one more MATCH cell $J$4, TB!$B$6:$B$2000.
 
So original formula works without J4, and bosco's formula works for when there is J4 condition. Correct? Then IF formula becomes...

=IF($J$4="",IFERROR(SUMIF(TB!$A$7:$A$10000,$B6,INDEX(TB!$C$6:$P$10000,0,MATCH($F$3,TB!$C$5:$P$5,0))),""),IFERROR(SUMIFS(INDEX(TB!$C$6:$P$10000,0,MATCH($F$3,TB!$C$5:$P$5,0)),TB!$A$6:$A$10000,$B6,TB!$B$6:$B$10000,$J$4),""))
 
Don't know if it will work with your data, but you could try another method.
=IFERROR(SUMIFS(INDEX(TB!$C$6:$P$10000,0,MATCH($F$3,TB!$C$5:$P$5,0)),TB!$A$6:$A$10000,$B6,TB!$B$6:$B$10000,IF($J$4="","<>",$J$4)),"")
 
Back
Top