Need help with syntax

dgardnerman

Board Regular
Joined
Jul 17, 2014
Messages
73
I'm trying to add some features to an existing formula so that if G/454= "ALLTHRD" "HDD_STUDS" "THRDD_STUDS" "DEFORMBARS" or "REBAR" are used in the drop down window, the target cell M/454 will display a blank and multiply O/454 by E/454.

Here is my current syntax and link to screenshot:

=IFERROR(IF(A454<>"x","",IF(G454="BOLT","",IF(I454="","",IF(G454="PLATE",(I454*K454/144*L454)*E454,IF(G454="GRATING","",IF(G454="DECKING","",(I454/12*L454)*E454)))))),"")

https://www.dropbox.com/s/r4v9nd4byq679bh/Screen Shot 2018-10-31 at 9.10.33 AM.png?dl=0
 
Last edited:
Yeah that didn't work, that returned a value of 279 million...

I see what you're doing, you're using either or, no sense in typing out everything if the other value is predictable.
 
Last edited:
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
hmmm...I see the logic when I run through it, but it's returning a blank whether it's from the bolt selection side or the angle selection side. Not sure where the tickler is?

I mixed up 641 and 461, had 641 in column G previously.

=IF(OR(A461="",E461="",M461="",O461=""),"",IF(AND(A461="x",OR(G461 ={"BOLT","DECKING"})),E461*O461,IF(AND(A461="x",OR(G461 ={"ANGLE","BAR"})),(E461*M461)*O461,"")))
 
Last edited:
Upvote 0
Just noticed column M has lbs after the number.

How's this? It assumes it always does.

=IF(OR(A461="",E461="",M461="",O461=""),"",IF(AND(A461="x",OR(G461 ={"BOLT","DECKING"})),E461*O461,IF(AND(A461="x",OR(G461 ={"ANGLE","BAR"})),(E461*SUBSTITUTE(M461," lbs.",""))*O461,"")))

Still doesn't account for bolt and decking not working.... Works fine for me.
 
Last edited:
Upvote 0
This will help debug.

=IF(OR(A461="",E461="",M461="",O461=""),"AEMO blank",IF(AND(A461="x",OR(G461 ={"BOLT","DECKING"})),E461*O461,IF(AND(A461="x",OR(G461 ={"ANGLE","BAR"})),(E461*SUBSTITUTE(M461," lbs.",""))*O461,IF(A461<>"x","x not x","other"))))


 
Upvote 0
This will help debug.

=IF(OR(A461="",E461="",M461="",O461=""),"AEMO blank",IF(AND(A461="x",OR(G461 ={"BOLT","DECKING"})),E461*O461,IF(AND(A461="x",OR(G461 ={"ANGLE","BAR"})),(E461*SUBSTITUTE(M461," lbs.",""))*O461,IF(A461<>"x","x not x","other"))))


Here is a screenshot with more breakout:

https://www.dropbox.com/s/32rv7ij3i9iykyt/Screen Shot 2018-10-31 at 11.06.41 PM.png?dl=0

Here is the file if you want to play in my dungeon:

https://www.dropbox.com/s/yh0qm7f5rprfyok/test sheet.xlsx?dl=0

I wanted to add the file because it will show you validation setting (if even needed) and VLOOKUP references in case there was a problem in that arena.
 
Last edited:
Upvote 0
Last edited:
Upvote 0
Here is a screenshot with more breakout:

https://www.dropbox.com/s/32rv7ij3i9iykyt/Screen Shot 2018-10-31 at 11.06.41 PM.png?dl=0

Here is the file if you want to play in my dungeon:

https://www.dropbox.com/s/yh0qm7f5rprfyok/test sheet.xlsx?dl=0

I wanted to add the file because it will show you validation setting (if even needed) and VLOOKUP references in case there was a problem in that arena.

I think I got it by changing the opening syntax from:
=IF(OR(A461="",E461="",M461="",O461="")
=IF(OR(A475="",E475<0,M475<0,N475="")
(btw...N475 is the old O461 shown above, I deleted column N as it was not tied to anything and was not needed)

Now the only issue is if I change the drop down in column G (TYPE), the VLOOKUP function that reports to column H (DESCRIPTION) defaults column M to a blank which returns column P (TOTAL) to #VALUE .

Not a show stopper by any means, it just forces the hand to input the correct description so the calculation can complete itself.
I would like to see the #VALUE go away though.
My thought is that we need an IFERROR statement put in somewhere to get rid of the #VALUE , I just don't know where to put it.

any thoughts?
 
Last edited:
Upvote 0
My formula from Post # 10 is working correctly for your sample file in Post # 16, provided there's a value in O460
 
Upvote 0
True, it works fine, however the drop down menu TYPE in column G dictates the type of calculation, and the formula in post 10 only has direction for 7 of the 16 TYPE's.
It's an either or situation wheras:
{"Angle","Bar","Beam","Channel","Hss","Pipe","Plate"} will multiply; N324*O324
and
{"Plug","bolt","decking","grating","thrdd_studs","hdd_studs","deformbars","allthrd","rebar"} will multiply; F324*O324

Sorry, I have been adding and deleting some columns as I construct so the formulas have been changing slightly.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,983
Messages
6,175,777
Members
452,668
Latest member
mrider123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top