Hi,
I have the below formula, its functions normally and returns the relevant cell data however when a members name is duplicated in column E but they are in different Crew numbers which is correct. The issue I'm running into is this member e.g. John Smith, is in both Crew 1 and Crew 4 in different locations, the locations appear on the sheet in alphabetical so they appear in Crew 4 prior to Crew 1, the index runs and triggers the Crew 1 calculation on the Crew 4 therefore returning 'Crew 3' and not the location
=IF(COUNTIFS($B:$B,"Crew 1",$E:$E,$AB514)>=1,INDEX($B:$B,MATCH($AB514,$E:$E,0)-2,,1),
IF(COUNTIFS($B:$B,"Crew 2",$E:$E,$AB514)>=1,INDEX($B:$B,MATCH($AB514,$E:$E,0)-4,,1),
IF(COUNTIFS($B:$B,"Crew 3",$E:$E,$AB514)>=1,INDEX($B:$B,MATCH($AB514,$E:$E,0)-6,,1),
IF(COUNTIFS($B:$B,"Crew 4",$E:$E,$AB514)>=1,INDEX($B:$B,MATCH($AB514,$E:$E,0)-8,,1)))))
Is there a way to prioritise the doing the calculation based off of the location of 'Crew 1' or whichever is first i.e Crew 4 and running the appropriate calculation first?
I have the below formula, its functions normally and returns the relevant cell data however when a members name is duplicated in column E but they are in different Crew numbers which is correct. The issue I'm running into is this member e.g. John Smith, is in both Crew 1 and Crew 4 in different locations, the locations appear on the sheet in alphabetical so they appear in Crew 4 prior to Crew 1, the index runs and triggers the Crew 1 calculation on the Crew 4 therefore returning 'Crew 3' and not the location
=IF(COUNTIFS($B:$B,"Crew 1",$E:$E,$AB514)>=1,INDEX($B:$B,MATCH($AB514,$E:$E,0)-2,,1),
IF(COUNTIFS($B:$B,"Crew 2",$E:$E,$AB514)>=1,INDEX($B:$B,MATCH($AB514,$E:$E,0)-4,,1),
IF(COUNTIFS($B:$B,"Crew 3",$E:$E,$AB514)>=1,INDEX($B:$B,MATCH($AB514,$E:$E,0)-6,,1),
IF(COUNTIFS($B:$B,"Crew 4",$E:$E,$AB514)>=1,INDEX($B:$B,MATCH($AB514,$E:$E,0)-8,,1)))))
Is there a way to prioritise the doing the calculation based off of the location of 'Crew 1' or whichever is first i.e Crew 4 and running the appropriate calculation first?