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.