# Excel IF Statements

February 15, 2009 at 19:06:12
Specs: Windows XP
 HELP PLEASE.I need to write an IF statement to to determine the discount given if a client pays his fees in advance. The raw data is:<7 day no discount7 - 13 days 5% discount14 - 20 days 8% discount21+ day 10%I have tried to write the statement as such=IF(H3,<6,0;IF(>=7<=13,.05,IF(>=14<=20,.08;IF(>21,.1))))but to no avail.Could you please helpJen

See More: Excel IF Statements

#1
February 15, 2009 at 19:35:27
 There are 2 problems with the construction of your If statement.First, the syntax of an IF statement is:IF(logical_test, value_if_true, value_if_false)So, when writing a Nested IF such as yours, the second IF has to be the value_if_false for the first IF since the second IF is what you want Excel to look at if the value of the first IF is FALSE, and so on.As an example, `=IF(A1<10,"A1<10",IF(A1>20,"A1>20","1020"))`Second, if you want to check if a value is between 2 numbers, you have to use an AND statement to get a TRUE or FALSE.`=AND(A1>=1,A1<=10)` will be TRUE for values from 1 to 10.So combining both of those concepts we get:`=IF(H3<7,0,IF(AND(H3>6,H3<14),0.05,IF(AND(H3>13,H3<21),0.08,0.1)))`Hope that helps.

Report •

#2
February 21, 2009 at 20:41:33
 Thank you for your input...I found it very helpful and beneficial to my understanding of excel.

Report •

#3
February 21, 2009 at 21:28:36
 Glad to have helped. Thanks for the feedback.

Report •

Related Solutions

#4
February 23, 2009 at 22:25:04