Issue with coordinates and ROUND(AGGREGATE

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
795
Office Version
  1. 365
Platform
  1. MacOS
Hi all,

Screenshot 2022-01-13 at 15.13.27.png


In cell B4, I have a formula that calculates the average coordinates for the volunteering events at which I have volunteered so far.

I then have the below formulas in B5, B6 and B7, which determine the parkrun with the closest coordinates to the average calculated in B4:

B5:
=IFERROR(IF('All Completed VC'!D4="","",TEXTJOIN(", ",,FILTER('All Completed VC'!C4:D2003,AGGREGATE(15,6,'All Completed VC'!AQ4:AQ2003,1)='All Completed VC'!AQ4:AQ2003))),"")

B6:
=IFERROR(IF('All Completed VC'!D4="","",TEXTJOIN(", ",,FILTER('All Completed VC'!C4:D2003,AGGREGATE(15,6,'All Completed VC'!AQ4:AQ2003,1)='All Completed VC'!AQ4:AQ2003))&" - "&TEXT(ROUND(AGGREGATE(15,6,'All Completed VC'!AQ4:AQ2003,1),0),"#,##0")&"K Away"),"")

B7:
=IFERROR(IF('All Completed VC'!D4="","",TEXTJOIN(", ",,FILTER('All Completed VC'!C4:D2003,AGGREGATE(15,6,'All Completed VC'!AQ4:AQ2003,1)='All Completed VC'!AQ4:AQ2003))&" - "&TEXT(ROUND(AGGREGATE(15,6,'All Completed VC'!AR4:AR2003,1),0),"#,##0")&" Miles Away"),"")

My problem is that B5, B6 and B7 are showing a string of the same parkrun, but it should just be showing one. These same formulas work if I change the list of parkruns to a fictional list of other ones, but whenever I use my actual data I get this list with multiples of the same parkrun showing in a string. Just wondered if there was a way to resolve this, and to find out why this is happening- as it works if I populate the list with different events.

Could it be something to do with Newport parkrun and Newport junior parkrun being at the same location, and I have volunteered at both?

My file can be found in the links below, it would be too complicated to explain without having a link to the file. It’s only a small file and should open straight up.

One Drive: Volunteering Average example.xlsx.xlsx
Dropbox: Volunteering Average example.xlsx.xlsx

Thanks in advance,

Olly.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top