@Rayan2019
Re: Subject Property. This is needed to compare to the others and see where it falls within the range
OK, I see now and that makes sense. However, as your column [Distance] has "n/a" on that row and you have a criteria on [Distance], I don't see how the "Subject Property" will ever be reported...
=> Formula updated to inc. that row
Re: Dashes. They are actual dashes rather than a formatting
You like to complicate your life :). Excel (and its competitors) like numbers, so wherever possible use numbers instead of text values - check out on this forum and others the number of people who raised the famous issue, i.e. Why is my SUM(...) = 0?. You won't believe it
If you want to see a Dash enter 0 in those cells and use a Custom Format where the 3rd "argument" is "-"
=> Formula revised to exclude the 0 + MaxPropertyOnTarget (renamed MaxPropertiesOnTargetOneBed) to do the same and formatted the cells as explained above
Re: Do you mind explaining to me why this part works and what it's even doing, please?
Well, on a previous case I already broke down an array formula for you => Refer to it as array calculations are always the same process
Re: And on C27, why does it take the first instance of $536 (Property 3) out of Match's lookup array (and so on)?
The ISNA(MATCH(C$3:C$20;C$25:C25;0)) part excludes the Properties already found. So, in C26 none are excluded as the content of C25 (Property) doesn't exist in C3:C20. Now assume in C26 we have reported "Property 7", then on C27 "Property 17" is excluded (= FALSE) in the array
Re: Is that related to the first part ( IF(ROWS($1:2)>MaxPropertiesOnTarget,"" ) or something else in the formula?
No, see above. The IF(ROWS($1:2) > MaxPropertiesOnTarget,"",...) is there to avoid doing IFERROR(...,"") and performing unecessary calculations
MaxPropertiesOnTarget reports the number of properties meetings the different criteria. So on each row (starting C26) we check if we exceeded the value of MaxPropertiesOnTarget. If that's the case we return "" and don't perform the array calculations => it's all about efficiency
Re. (The formula you spent a lot of time). Do you know of a way to tweak it...?
I won't spend time on this at least for the following reasons:
- In my 1st reply I mentioned you were matching n times the same thing - MATCH("Subject*",$B$3:$B$20,0). This makes no sense to me from an efficiency perspective => Name a cell on that row and you're done, you have the refererence you need
- Your formula doesn't account for the "Dashes" (in P11) you want to exclude...
- With the IFERROR approach unecessary array calculations are performed. Assume a range of 1000 rows instead of your current range. Does it really makes sense to perform 997 array calculations when only 3 Properties meet the various criteria???
Revised version of the workbook is available here
Hope this helps