• 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.

Condditional sumproduct

farrusete

Member
Hi,

How could I do something like this? (between ----> and <----):

=SUMPRODUCT((Table[Column1]=A9)*(Table[Column2]=---->IF($B$2<>"ALL",$B$2,"<>ALL")<----)*Table[[costs january]:[costs december]])

I mean, to set a conditional returning a dynamic value for that column. If value in B2 is "ALL" then get values from Table[Column2] which are different than "ALL" or even a wildcard "*" or something like that. If value in B2 is anything else, then ill get values from Table[Column2] = that text.

Thank you in advance,
 
Hi ,

Something like this ?

=SUMPRODUCT((Table[Column1]=A9)*(Table[Column2]=IF($B$2<>"ALL",$B$2,Table[Column2]))*Table[[costs january]:[costs december]])

Narayan
 
I was trying to put the conditional in the wrong position... this worked for me:

=SUMPRODUCT((Table[Column1]=A9)*(IF($B$2<>"ALL",Table[Column2]=$B$2,Table[Column2]<>"ALL"))*Table[[costs january]:[costs december]])
 
Back
Top