Forum Discussion
Help on an IFS statement please
- Sep 14, 2022
Integrity_Drywall In the attached i created a table with your model names and sq.ft. info and then to the right I have a drop down to select a model and then in the next cell I use VLOOKUP to lookup the sq.ft. for the model you selected. I hope it helps you learn/understand how to use a LOOKUP. There are also innumerous resources on the web. I highly recommend this method as it makes your life much easier. The formula is much smaller and easier to understand (once you understand LOOKUP) and you can easily update/change the information in the table and not have to search every formula.
Integrity_Drywall first off the error appears to be at the end:
...., D32="192 DREAMSICLE”,1378)")
That final ") doesn't match anything
That said I highly suggest you create a table with the values you want and use a simple LOOKUP instead of this large IFS statement. BTW, another option in this case would have been to use SWITCH but a LOOKUP table would still be better IMHO
- Integrity_DrywallSep 14, 2022Copper ContributorI really appreciate the help. I am new at this and dont know how to use switch or a look up.
- mtarlerSep 14, 2022Silver Contributor
Integrity_Drywall In the attached i created a table with your model names and sq.ft. info and then to the right I have a drop down to select a model and then in the next cell I use VLOOKUP to lookup the sq.ft. for the model you selected. I hope it helps you learn/understand how to use a LOOKUP. There are also innumerous resources on the web. I highly recommend this method as it makes your life much easier. The formula is much smaller and easier to understand (once you understand LOOKUP) and you can easily update/change the information in the table and not have to search every formula.
- mathetesSep 15, 2022Silver Contributor
Integrity_Drywall to underscore what my friendmtarler has said, the reason the LOOKUP approach works better in the long term, is that what you were doing is what's called "hardcoding of variables." You were building variables into the formula itself, a practice that though it can work in the short term, makes any formula vulnerable when, in keeping with the meaning of the term "variable," one or more of those variables actually varies, changes...
Using a table, on the other hand, keeps the formula robust, and allows you to change the variables with impunity.