# Problems with multiple IF statements into one Formula

#### wberg82

##### New Member
=IF((OR(B8=0.375,B8=0.5)),CEILING(C8*D8+E8+F8*0.057+G8*0.094+IF(AND(B8=0.375,H8="X"),0.328125)+IF(AND(B8=0.375,I8="X"),0.453125)*0.25,CEILING(C8*D8+E8+F8*0.069+G8*0.125+IF(AND(B8=0.5,H8="X"),0.4375)+IF(AND(B8=0.5,I8="X"),0.59375)*0.25,0)))

The above formula outputs "0". How I want this formula to work is if the user enters either .375 or .5 to cell B8 the output will equal a different rounded up (to nearest .25) number. If user enters .375 - the output should add a set of numbers. If user enters .5 - the output should add up a different set of numbers.

What am I doing wrong??? I appreciate the help

Thanks!

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

#### joeu2004

##### Well-known Member
What am I doing wrong???

There are so many things that you're doing wrong. I'll be brief.

At a minimum, you have a misplaced right-parenthesis, such that the second CEILING function is effectively the second paramater of the first CEILING function instead of the third parameter of the IF function, as I believe you intend.

Also, you are mysteriously multiplying by 0.25, when I suspect the intention is for 0.25 to be the second parameter of each CEILING function, as I demonstrated in my response to your previous question.

Good luck!

PS.... The formula design can be simplified so that you avoid the AND conditions.

Last edited:

#### DanteAmor

##### Well-known Member
The CEILING function syntax has the following arguments:

Number. The value you want to round.
Significance. The multiple to which you want to round.

In the first Ceiling function you have:
Number. C8*D8+E8+F8*0.057+G8*0.094+IF(AND(B8=0.375,H8="X"),0.328125)+IF(AND(B8=0.375,I8="X"),0.453125)*0.25.
Significance. CEILING(C8*D8+E8+F8*0.069+G8*0.125+IF(AND(B8=0.5,H8="X"),0.4375)+IF(AND(B8=0.5,I8="X"),0.59375)*0.25,0).

In the Second Ceiling function you have:
Number. C8*D8+E8+F8*0.069+G8*0.125+IF(AND(B8=0.5,H8="X"),0.4375)+IF(AND(B8=0.5,I8="X"),0.59375)*0.25.
Significance. 0

The result of the second ceiling is 0, that argument is the one that you pass to the first ceiling, then the result of the first ceiling is 0.

#### mole999

##### Moderator
do they work individually, then assemble bit by bit

Replies
1
Views
216
Replies
2
Views
379
Replies
3
Views
58
Replies
2
Views
214
Replies
1
Views
108

1,109,436
Messages
5,528,758
Members
409,834
Latest member
vexceled

### This Week's Hot Topics

• Change military grades into rank
Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
• VBA COUNTIF SOLUTION
Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
• INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...