 # Thread: My Formula isnt working Properly.

1.  ## My Formula isnt working Properly.

I am trying figure out what the issue is with my formula.

IF(Height>96", (15'-(Height+6")),
IF((Height/2)>2', 8',
IF((Height/2)<2', 15'-(5'+(Height/2), Height +2"))))

The Dialog that I am receiving is " Comma not expected." However, I am not sure what comma is extra as I have tried to remove one by one.

I was hoping someone here could help me.  Reply With Quote

2.  Your getting this error with all those formula's?

The middle one is missing a '')'' on the end.
The top one needs that comma at the end removed and another '')'' put there

Or is it all 1 formula?  Reply With Quote

3. 3   Originally Posted by Modderhoop Your getting this error with all those formula's?

The middle one is missing a '')'' on the end.
The top one needs that comma at the end removed and another '')'' put there

Or is it all 1 formula?
I understand that it is all one formula.

These are the issues I see:
• For clarity, instead of writing (Height/2) <2' , you could write simply Height/2 > 2' ; it is the same but without two unnecessary parenthesis.
• For clarity, it is better to keep the same format for the numeric values, such as all in inches.
• For clarity, instead of writing Height/2 > 2' , you could write Height > 48". Same but simpler.
• The parenthesis that begins before 5' was not closed, and that caused a confusion with the commas.
• The formula needs 2 IFs statements only, not 3. The last part of the formula, Height +2" , has no chance to happen, because your third IF is the opposite of your 2nd IF. You wrote: if Height divided by 2 is greater than 2 do this, and then you added the opposite condition in the third IF: if Height divided by 2 is less than 2', do that. Instead of adding a third IF, simply write the "otherwise, do this" part.

In summary, as per the above comments, the formula could be like this:

if(Height > 96", 180" - (Height + 6"), if(Height > 48", 96", 180" - (60" + Height / 2)))

If Height is greater than 96", do this. Otherwise do this: if it is greater than 48", do this, otherwise, do this.
Hope that helps.  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•