Forum Discussion
Having trouble with IF formula
- Sep 06, 2025
I agree with mathetes​ that it's very difficult to diagnose such a formula. Comparing the if_true part of the formula with the if_false part I notice some inconsistencies concerning the number and placement of several parentheses. If you can fix that your problem will probably be solved.
You mention that the if_false calculation (i.e. X8 is not checked) returns the correct value, then why not us this:
= ( INDEX ( DATA_THK, MATCH(1,(Flg_Thk[Spec.]=N8)*(Flg_Thk[Series]=O8)*(Flg_Thk[Class]=P8)*(Size=Q8),0), MATCH(R8,FLG_TYPE, 0) ) + T8 * (R8="Lap Joint (LJ)") + V8 * (U8="RF") ) * IF(X8, 2, 1)
I hope I got all the pairs of parentheses correct. See if this works. If not please upload you file or a link to on OneDrive or similar that give access to it. Then it will be a lot easier to help.
I agree with mathetes​ that it's very difficult to diagnose such a formula. Comparing the if_true part of the formula with the if_false part I notice some inconsistencies concerning the number and placement of several parentheses. If you can fix that your problem will probably be solved.
You mention that the if_false calculation (i.e. X8 is not checked) returns the correct value, then why not us this:
=
(
INDEX
(
DATA_THK,
MATCH(1,(Flg_Thk[Spec.]=N8)*(Flg_Thk[Series]=O8)*(Flg_Thk[Class]=P8)*(Size=Q8),0),
MATCH(R8,FLG_TYPE, 0)
)
+ T8 * (R8="Lap Joint (LJ)") + V8 * (U8="RF")
)
* IF(X8, 2, 1)
I hope I got all the pairs of parentheses correct. See if this works. If not please upload you file or a link to on OneDrive or similar that give access to it. Then it will be a lot easier to help.
- Greg_MSep 08, 2025Copper Contributor
Hi Riny,
https://jnewelding-my.sharepoint.com/:x:/p/gmclellan/EcAycfuREepFhmfGk2k_n6IB2k8RbbO2MSWGzZC90-Js6w?e=gTGS7r
I guess that did something to the formula. This works fine if I have "Lap Joint (LJ)" is selected in R8 and a Schedule is selected in S8 giving me a total in T8, but I want it to only add T8 if "Lap Joint (LJ)" is selected in R8.
I hope that makes sense. I linked the excel above.
- Greg_MSep 08, 2025Copper Contributor
Thank you Riny_van_Eekelen,
That worked! I don't go into OneDrive very much, I didn't know you could get links to your workbook from there.
I am still new to writing formulas, but learning. The *IF(X8, 2, 1) cleaned that up a lot, and I'm happy I can add that to my knowledgebase.
Thank you,
Greg