Forum Discussion
What is the order of operations for nested IF & AND statements over a range of cells
- May 05, 2024
=IFERROR(INDEX($B$2:$K$2,SMALL(IF(($B$4:$K$4=0)*($B$6:$K$6<>0),COLUMN($B:$K)-1),ROW($A1))),"")
This formula could be an alternative and it returns the categories in cell E9 and below in my sample file. The formula must be entered as an arrayformula with ctrl+shift+enter if someone doesn't work with Office 365 or Excel for the web or Excel 2021.
In my first reply i unfortunately forgot to mention that the formula must be dragged down from cell E9. In my sample file i entered the formula in cell E9 and confirmed it with ctrl+shift+enter. Then i dragged the formula down across range E9:E18. Since there are 4 categories with a weight and no score (in the sample file) these are now returned in range E9:E12. Cells E13:E18 are empty because the formula uses the IFERROR function to return an empty cell instead on an error message. If the entries for the weight and score are changed for a category the results update dynamically in range E9:E18. If all 10 categories have a weight and no class then all are listed in range E9:E18.
Do you work with a recent version of Excel such as Excel 2021, Office 365 or Excel for the web? If so then there are other possible solutions for this task with formulas such as TEXTJOIN and FILTER.
Thanks!