Search code examples
excelifs

Using IFS with a negative number


I'm trying to calculate a pricing difference when there is a change requested by a customer. The units of measure are E for each, C for per hundred, M for per thousand. My formula is making either every result negative or positive, not taking into account the change noted in Column F. I also tried the formula with an IF of the results of Col E greater than Col D, with the else being multiplied by -1, and vice versa. If more info is needed, I'll be happy to provide it.

HeaderRow

=IF(F2<0,IFS($C2="E",PRODUCT($B2,$F2,,-1),$C2="C",PRODUCT(PRODUCT($B2,$F2,-1)/100),C2="M",PRODUCT(PRODUCT($C2,$F2,-1)/1000)),IFS($C2="E",PRODUCT($B2,$F2),$C2="C",PRODUCT(PRODUCT($B2,$F2)/100),C2="M",PRODUCT(PRODUCT($C2,$F2)/1000)))


Solution

  • I fixed this by adding columns for a new line total and net change:

    Fixed