Problems with multiple IF statements into one Formula

wberg82

New Member
Joined
Feb 19, 2016
Messages
38
=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!
 

Some videos you may like

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
Joined
Mar 2, 2014
Messages
2,813
Office Version
  1. 2010
Platform
  1. Windows
What am I doing wrong???

Not expressing appreciation when people answer your (other) questions.

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
Joined
Dec 3, 2018
Messages
12,593
Office Version
  1. 2007
Platform
  1. Windows
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
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
do they work individually, then assemble bit by bit
 

Watch MrExcel Video

Forum statistics

Threads
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...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top