google spreadsheet - Nested IF statement to check between values -


i'm struggling if statement in google docs.

i'm using financially find out interest accrued on value.

interest either 1%, 2% or 3% depending on amount.

if amount between £0 , £1999 1% given if between £2000 , £2999 2% given , on £3000 comes 3%

here attempt:

=if(m8>=3000,(m8/100)*3,if(m8<2999),(m8/100)*2,if(m8<1999),(m8/100)*1) 

my thought process here first check >=3000 , work out 3%. if statement wasn't true continue on 2% calc , on.

but doesn't work. "wrong number of arguments if" error

you not closing if statements , need two.

the logic should be: if number more or equal 3000, multiply 3, if number less 3000, more 1999(more or equal 2000) multiply 2, in other case (when number less or equal 1999) multiply 1.

here working function

=if(m8>=3000,(m8/100)*3,if(and(m8>1999,m8<3000),(m8/100)*2,(m8/100)*1)) 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -