AGGREGATE function not working as expected

ollyhughes1982

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

I have the below table and the following formula:

Excel Formula:
=IF('All Completed Runs'!C4="","",IFERROR(AGGREGATE(14,6,'All Completed Runs - LETTER-I.'!C4#/(COUNTIF('All Completed Runs - LETTER-I.'!C4#,">="&'All Completed Runs - LETTER-I.'!C4#)>='All Completed Runs - LETTER-I.'!C4#),1),1))

Screenshot 2023-10-10 at 17.42.05.png


This works for me in another almost identical worksheet where I have parkrun event names in column B, rather than just their first letter. But this doesn’t seem to be working when I have just the letters in column B. This is the only difference between the worksheets, so cannot understand why the same formula (just with the reference worksheet name changed) doesn’t work.

The other (working) table looks like this:
Screenshot 2023-10-10 at 17.48.36.png


The above table uses the following formula (which works):

Excel Formula:
=IF('All Completed Runs'!C4="","",IFERROR(AGGREGATE(14,6,'All Completed Runs - p-I.'!C4#/(COUNTIF('All Completed Runs - p-I.'!C4#,">="&'All Completed Runs - p-I.'!C4#)>='All Completed Runs - p-I.'!C4#),1),1))

The result I am getting is 1. However, the result I should be getting is 8, as there 8 or more letters that I have done 8 or more times. In my case I have done the letters A B C L M P S T W all 8 or more times. I can’t understand why I am getting a result of 1??

Thanks in advance!

Olly.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Apologies, this has now been resolved by using
Excel Formula:
=IF(B4="","",COUNTIF('All Completed Runs'!AT:AT,B4#))
in C4 of column C. Not sure why this works, but using this formula then makes the original calculation
Excel Formula:
=IF('All Completed Runs'!C4="","",IFERROR(AGGREGATE(14,6,'All Completed Runs - LETTER-I.'!C4#/(COUNTIF('All Completed Runs - LETTER-I.'!C4#,">="&'All Completed Runs - LETTER-I.'!C4#)>='All Completed Runs - LETTER-I.'!C4#),1),1))
work. Thanks.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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