# Whats wrong with my formula

#### ksuthy

##### New Member
Hello,

anyone want to take a stab at what is wrong with my formula?

=if(and([@inches]=0,[@[Length feet]]=6),6,if(and([@inches]=0,[@[Length feet]]=8),8,if(and([@inches]=0,[@[Length feet]]=10),10,if(and([@inches]=0,[@[Length feet]]=12),12,if(and([@inches]=0,[@[Length feet]]=14),14,if(and([@inches]=0,[@[Length feet]]=16),16,if(and([@inches]=0,[@[Length feet]]=18),18,if(and(([@inches]=0,[@[Length feet]]=20),20,if(and([@inches]=0,[@[Length feet]]=22),22,if((and([@inches]=0,[@[Length feet]]=24),24,IF(SUM([@[Length feet]]+([@inches]/12))<6),6,IF((AND(SUM([@[Length feet]]+([@inches]/12))<8,[@[Length feet]]+([@inches]/12)>6)),8,IF(AND(SUM([@[Length feet]]+([@inches]/12))<10,[@[Length feet]]+([@inches]/12)>8),10,IF(AND(SUM([@[Length feet]]+([@inches]/12))<12,[@[Length feet]]+([@inches]/12)>10),12,IF(AND(SUM([@[Length feet]]+([@inches]/12))<14,[@[Length feet]]+([@inches]/12)>12),14,IF(AND(SUM([@[Length feet]]+([@inches]/12))<16,[@[Length feet]]+([@inches]/12)>14),16,IF(AND(SUM([@[Length feet]]+([@inches]/12))<18,[@[Length feet]]+([@inches]/12)>16),18,IF(AND(SUM([@[Length feet]]+([@inches]/12))<20,[@[Length feet]]+([@inches]/12)>18),20,IF(AND(SUM([@[Length feet]]+([@inches]/12))<22,[@[Length feet]]+([@inches]/12)>20),22,FALSE))))))))))))))))))))

#### 6StringJazzer

##### Active Member
Why do you think there's something wrong with it?

What do you want it to do?

What is it doing instead?

#### ksuthy

##### New Member
Why do you think there's something wrong with it?

What do you want it to do?

What is it doing instead?

I am missing a parentheses somewhere - i keep getting an error message.

#### sandy666

##### Well-known Member
you did not lose the brackets, they are in a wrong places

 (​ 66​ )​ 66​ +​ 17​ ,​ 56​ /​ 17​ <​ 9​ =​ 21​ >​ 8​ @​ 54​ [​ 81​ ]​ 81​

#### Michael M

##### Well-known Member
Bit hard to evaluate when you are using Named Ranges !
If you highlight the formula in the formula bar each parens is a different colour, that should give a start as to where the one is missing

#### ksuthy

##### New Member
Thank you! i don't understand the chart

#### sandy666

##### Well-known Member
example :
,if((and([@inches]=0,[@[Length feet]]=24),24,.........
after that the rest of the "formula" is a logical test

and why

SUM([@[Length feet]]+([@inches]/12))
it looks like SUM SUM instead of SUM
SUM([@[Length feet]],[@inches]/12)

and many more errors like above

use intellisense to check this "string"

Last edited:

#### ksuthy

##### New Member
omg OK I solved it-its easiest for me because things are highlighted- thanks for the input.

here is the formula corrected :
=IF(AND([@inches]=0,[@[Length feet]]=6),6,IF(AND([@inches]=0,[@[Length feet]]=8),8,IF(AND([@inches]=0,[@[Length feet]]=10),10,IF(AND([@inches]=0,[@[Length feet]]=12),12,IF(AND([@inches]=0,[@[Length feet]]=14),14,IF(AND([@inches]=0,[@[Length feet]]=16),16,IF(AND([@inches]=0,[@[Length feet]]=18),18,IF(AND([@inches]=0,[@[Length feet]]=20),20,IF(AND([@inches]=0,[@[Length feet]]=22),22,IF(AND([@inches]=0,[@[Length feet]]=24),24,IF(SUM([@[Length feet]]+([@inches]/12))<6,6,IF(AND(SUM([@[Length feet]]+([@inches]/12))<8,SUM([@[Length feet]]+([@inches]/12)>6)),8,IF(AND(SUM([@[Length feet]]+([@inches]/12))<10,SUM([@[Length feet]]+([@inches]/12)>8)),10,IF(AND(SUM([@[Length feet]]+([@inches]/12))<12,SUM([@[Length feet]]+([@inches]/12)>10)),12,IF(AND(SUM([@[Length feet]]+([@inches]/12))<14,SUM([@[Length feet]]+([@inches]/12)>12)),14,IF(AND(SUM([@[Length feet]]+([@inches]/12))<16,SUM([@[Length feet]]+([@inches]/12)>14)),16,IF(AND(SUM([@[Length feet]]+([@inches]/12))<18,SUM([@[Length feet]]+([@inches]/12)>16)),18,IF(AND(SUM([@[Length feet]]+([@inches]/12))<20,SUM([@[Length feet]]+([@inches]/12)>18)),20,IF(AND(SUM([@[Length feet]]+([@inches]/12))<22,SUM([@[Length feet]]+([@inches]/12)>20)),22,FALSE)))))))))))))))))))

I used this for a l

#### ksuthy

##### New Member
yep that was the problem- thank you!

#### sandy666

##### Well-known Member
but I still see SUM SUM

incorrect: SUM([@[Length feet]]+([@inches]/12)>20))
correct: SUM([@[Length feet]],[@inches]/12)>20,
or ([@[Length feet]]+[@inches]/12)>20,

SUM() ->>> syntax

Last edited:

1,082,044
Messages
5,362,843
Members
400,694
Latest member
Sofie17

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...