if value of A1 cell is between 3 and 6 value of B1 cell is 0.3, if value of A1 cell is between 6 and 12 then value of B1 cell is 0.5 and if value of A1 cell is between 12 & 24 then value of B1 cell is 1 otherwise value of B1 cell is zero how should I express this in formula bar please guide me sir.
in Other Math Topics by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

This the Excel formula bar?

General format IF({test statement},{value if true},{value if false}). IF statements can be nested so that more IF statements can be inserted where the values are. The AND function has the format AND({condition1},{condition2}...) and returns TRUE or FALSE.

Combining these we have:

=IF(AND(A1>=3,A1<=6),0.3,IF(AND(A1>=6,A1<=12),0.5,IF(AND(A1>=12,A1<=24),1,0))) as the formula in B1.

EXPLANATION

The three closing brackets or parentheses (")")are necessary to satisfy the "grammar" or syntax. The last one belongs to the first IF statement, the middle one to the second IF statement and the first belongs to the third IF statement. Excel will show a syntax error if any brackets are missing. A quick way of checking is to count the number of opening brackets and the number of closing brackets; they must be the same. In this case, there are 6 of each.

Because AND returns TRUE or FALSE it's not necessary to follow it with "=TRUE", although you may do if you wish, but if you do it must come before the comma. The formula bar must start with "=" otherwise, Excel will assume you are writing a string of text. Excel will then help you through construction of the formula.

Excel encounters "=" in the formula bar and knows a formula follows. It sees the IF statement and expects 3 parameters separated by commas. The first parameter is the AND function; the second is 0.3 and the third is another IF statement. If the AND result is TRUE, 0.3 goes on B1. Otherwise it moves on to the third parameter, the second IF statement and applies the same logic. The third parameter of the second IF statement is activated if the second AND function returns FALSE, and Excel encounters the third IF statement, applying the same logic. The third parameter of the third IF statement is zero, so B1=0 if the last AND function returns FALSE.

by Top Rated User (1.1m points)

Related questions

1 answer
asked May 5, 2013 in Statistics Answers by anonymous | 1.6k views
1 answer
asked Jul 29, 2015 in Statistics Answers by Lenora | 572 views
1 answer
asked Jan 29, 2015 in Statistics Answers by VLanham Level 1 User (420 points) | 1.3k views
1 answer
0 answers
asked Jan 22, 2014 in Geometry Answers by ray ann ardiente | 507 views
1 answer
Welcome to MathHomeworkAnswers.org, where students, teachers and math enthusiasts can ask and answer any math question. Get help and answers to any math problem including algebra, trigonometry, geometry, calculus, trigonometry, fractions, solving expression, simplifying expressions and more. Get answers to math questions. Help is always 100% free!
87,542 questions
99,811 answers
2,417 comments
523,692 users