Forum Discussion

anl299's avatar
anl299
Copper Contributor
May 07, 2024

Re: What is the order of operations for nested IF & AND statements over a range of cells

This is almost exactly what I need, the only issue is that for me it only returns the first value that meets the criteria. In my file, if I had only columns #07 and Final with values of 0 but with a weight, it would only return "#07". Same thing if I made the columns #07, #08, #09 and Final have a weight but no scores, it would only return "#07". I expect (without testing) that if my file had your data, it would only return "header4" while ignoring 8, 9 and 10.
I don't know if there is some overflowing block happening that preventing the rest of the name from showing or what.

Also, I haven't had the time to really look into your code. I'm half decent at coding, but extremely new to excel so I've never used any of the formulas or functions you used. I might be able to figure it out given enough time, but if you had any ideas right off the bat, I'm all ears

Thanks.

3 Replies

  • OliverScheurich's avatar
    OliverScheurich
    Gold Contributor

    anl299 

    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.

Resources