Hello,
Thanks for reading. For a model i am working on i need to move activity from one building to the nth closest match which matches a specified criteria. I think i need to use the SMALL function to return the position of the smallest distance which matches my criteria, i can then offset this to the Unique ID of that site which is positioned above. Note i can't use the MATCH function as sometimes the postcodes are the same but the buildings are different (and do not match my criteria) and Match will return the first match only.
My formula below is consistently returning criteria matches but not the nth closest:
=OFFSET('Postcode Distance Matrix'!$F$7,-3,SMALL(IF(('Postcode Distance Matrix'!$G$3:$BR$3='Space Required Pivot '!$G10)*('Postcode Distance Matrix'!$G12:$BR12), COLUMN('Postcode Distance Matrix'!$G$3:$BR$3)-COLUMN('Postcode Distance Matrix'!$G12)+1), K$3))
Postcode Distance Matrix G3:BR3 - matching criteria
Space Required Pivot G - Matching criteria
Postcode Distance Matrix G12:BR12 - contains distance between buildings
Any idea how i can amend my formula to consistently return the nth smallest match??
Thanks for reading. For a model i am working on i need to move activity from one building to the nth closest match which matches a specified criteria. I think i need to use the SMALL function to return the position of the smallest distance which matches my criteria, i can then offset this to the Unique ID of that site which is positioned above. Note i can't use the MATCH function as sometimes the postcodes are the same but the buildings are different (and do not match my criteria) and Match will return the first match only.
My formula below is consistently returning criteria matches but not the nth closest:
=OFFSET('Postcode Distance Matrix'!$F$7,-3,SMALL(IF(('Postcode Distance Matrix'!$G$3:$BR$3='Space Required Pivot '!$G10)*('Postcode Distance Matrix'!$G12:$BR12), COLUMN('Postcode Distance Matrix'!$G$3:$BR$3)-COLUMN('Postcode Distance Matrix'!$G12)+1), K$3))
Postcode Distance Matrix G3:BR3 - matching criteria
Space Required Pivot G - Matching criteria
Postcode Distance Matrix G12:BR12 - contains distance between buildings
Any idea how i can amend my formula to consistently return the nth smallest match??