Add criteria to MAX INDEX MATCH formula

ollyhughes1982

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

Screenshot 2022-02-22 at 11.35.35.png


I have the below formula, but I need to add in one IF criteria to it. The formula basically lists if I have done a run of 7 different countries in consecutive parkrun weeks - which is working correctly. However, I now want to add in a criterion to ignore one particular country value - 'UK Crown Dependencies'.

=IF(ROW($A1)<=MAX('All Completed Runs'!$CQ:$CQ),INDEX('All Completed Runs'!D:D,MATCH(MAX('All Completed Runs'!$CQ:$CQ),'All Completed Runs'!$CQ:$CQ,FALSE)-MAX('All Completed Runs'!$CQ:$CQ)+ROW($A1)),"")

I need to only include values from 'All Completed Runs'!D:D which are not equal to ‘UK Crown Dependencies’. i.e. Ignore any country values that equal ‘UK Crown Dependencies’. This is because it is not a true country and needs to be ignored. In other formulas I have added in something like below, but am struggling to do this in this case:

'All Completed Runs'!D3:D5002<>"UK Crown Dependencies"

Thanks in advance,

Olly.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Peter's point is that that is not the only other forum you posted this on.
 
Upvote 0

Forum statistics

Threads
1,214,988
Messages
6,122,620
Members
449,092
Latest member
amyap

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