Whats wrong with my formula

ksuthy

New Member
Joined
Jan 29, 2019
Messages
6
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
Joined
Jan 27, 2010
Messages
372
Why do you think there's something wrong with it?

What do you want it to do?

What is it doing instead?
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
3,789
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
Joined
Oct 27, 2005
Messages
18,185
Office Version
2013
Platform
Windows
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
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
3,789
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
Joined
Jan 29, 2019
Messages
6
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
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
3,789
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:

Forum statistics

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

Some videos you may like

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...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top