Myke_Oxlong
Myke_Oxlong

Reputation: 3

google sheets formula returning false instead of integer

im trying to create a formula in sheets that automatically calculates tax with the Australian tax table. values less than 18201 return the correct integer, but greater than that or less than 180001 return false instead of the correct value. I'm absolutely stumped, and it doesn't help that I have about 2 hours of coding experience in my entire life.

=IF(Sheet2!A1<=18200,0,IF(18201<=Sheet2!A1<=45000,(Sheet2!A1*0.19),IF(45001<=Sheet2!A1<=120000,SUM(5092,((Sheet2!A1-45000)*0.325)), IF(120001<=Sheet2!A1<=180000,SUM(29467,(Sheet2!A1-120000)*0.37),IF(180001<=Sheet2!A1,SUM(51667,(Sheet2!A1-180000)*0.45))))))

If you legends could help me out, that would be great. just tell me where I went wrong, and how to fix it because this is for my ipt class.

Upvotes: 0

Views: 74

Answers (1)

raman
raman

Reputation: 980

Looks like a issue with the second and third nested IF statements.

I have updated the formula. hope this will help

=IF(Sheet2!A1<=18200,0,IF(AND(18201<=Sheet2!A1,Sheet2!A1<=45000),(Sheet2!A1*0.19),IF(AND(45001<=Sheet2!A1,Sheet2!A1<=120000),SUM(5092,((Sheet2!A1-45000)*0.325)), IF(AND(120001<=Sheet2!A1,Sheet2!A1<=180000),SUM(29467,(Sheet2!A1-120000)*0.37),IF(Sheet2!A1>=180001,SUM(51667,(Sheet2!A1-180000)*0.45))))))

Upvotes: 0

Related Questions