Forum Discussion
Listing IF formulas
RobbieD2020 Well, I don't know what you are trying to achieve, but at least I suspect that this bit is wrong:
IF($D22>=2,$D22<4,IF(
Also, your formula contains all sorts of fixed numbers:
SUM($D22/(($BP22-56-245)*($BQ22-110-140)/1000000)
some of these seem to vary with the conditions in your IF sequence. can you perhaps setup a table which lists the condition limits in its first column and the constants in your formula in subsequent columns? That way you can use the values in your conditions to lookup (look in Help for the VLOOKUP function) the numbers in that table and constuct a much simpler formula.
- RobbieD2020Jan 17, 2020Copper Contributor
Thank you JKPieterse
Yes, you seem to be right about IF($D22>=2,$D22<4,IF(. I'll need to look at that again. Essentially, I'm trying to say that if a number in a cell ($D22) is equal to or greater than 2 and less than 4, then....blah blah blah. That's clearly the wrong way to express it.
However, the 1st and last IF commands in my string work individually but it is only when I separate them with a comma, to try and use them together, that I get the issue.
I also agree that using fixed numbers in the string is not the "best way" but even so, it should work. I'm under time constraints on this and was hoping to cut a few corners..
I'll investigate VLOOKUP, thanks.
- mathetesJan 17, 2020Gold Contributor
Excellent advice to @RobbieD2020 , specifically the warning against hard-coding values into formulas. The more we can build tables and refer to them as the source for values that can change (even if "almost never") is a way to have a far more robust worksheet in general.