Forum Discussion

Jimbobmcwalton's avatar
Jimbobmcwalton
Brass Contributor
Feb 27, 2019
Solved

Excel formula Switch help

Hi There,   I am having an issue with this formula    =SWITCH(W404=Z$2,TRUE,S404*0.1,FALSE,S404*0.025)   Despite the cell in question matching the fixed cell Z$2 (being TRUE) the formula is cal...
  • SergeiBaklan's avatar
    SergeiBaklan
    Feb 28, 2019

    Hi Jim,

     

    Your data is not synced. For example, in some places you have "Same Day", in others "Same Day " with the space at the end. You compare text "TRUE" with logical value TRUE, etc. I tried to eliminate with

    =INDEX(ProbMatrix[Commission Rate],MATCH(1, INDEX( (TRIM([@[AC Type]])=ProbMatrix[Account]) * ([@[Sales Person]]=ProbMatrix[Sales Person]) * ( ([@[Over a Year]]="TRUE")=ProbMatrix[Over a Year]),0),0))

    For your helper table it's better to add one more column which says we have commission as per cent or as absolute value, when we may calculate it as

    =IF(INDEX(ProbMatrix[%],MATCH(1, INDEX( (TRIM([@[AC Type]])=ProbMatrix[Account]) * ([@[Sales Person]]=ProbMatrix[Sales Person]) * ( ([@[Over a Year]]="TRUE")=ProbMatrix[Over a Year]),0),0))="Y",[@[Courier Pay]]*[@Commission],[@Commission])

    I'm not sure where is the formula from which you started this conversation.

Resources