help with formulae

Copper Contributor

=IFS(D4<300,0,D4<=399.99,B4*6%,D4>399.99>499.99,B4*9%,D4>499.99<599.99,B4*13%,D4>599<699.99,B4*17%,D4>699.99<899.99,B4*22%,D4>899.99,B4*23%)

 

Why is this not working properly?

 

4 Replies
There is a slight mistake in logical test3 of the IFS formula

=IFS(D4<300,0,D4<=399.99,B4*6%,D4>399.99<499.99,B4*9%,D4>499.99<599.99,B4*13%,D4>599<699.99,B4*17%,D4>699.99<899.99,B4*22%,D4>899.99,B4*23%)@Abiola1@Abiola1  I have adjusted it however it returns #n/a now.  Any idea why?

 

@Gavc1 Try it like this in stead.

=IFS(D4>=900,B4*23%,D4>=700,B4*22%,D4>=600,B4*17%,D4>=500,B4*13%,D4>=400,B4*9%,D4>=300,B4*6%,D4<300,0)

 A reference like " D4>399.99<499.99 " will never work as it is fundamentally wrong. You would have to use something like " AND(D4>399.99,D4<499.99) ". 

@Gavc1 

As variant

=B4*LOOKUP(D4,{-111,300,400,500,600,700,900},{0,0.06,0.09,0.13,0.17,0.22,0.23})