excelbytes
Active Member
- Joined
- Dec 11, 2014
- Messages
- 251
- Office Version
- 365
- Platform
- Windows
I have this formula in cell E4, then copied down:
=IFERROR(INDEX($B$4:$B$74,AGGREGATE(15,6,(ROW($B$4:$B$74)-ROW(INDEX($B$4:$B$74,1))+1)/($A$4:$A$74=D4)/(COUNTIF($E$3:E3,$B$4:$B$74)=0),1)),"")
In essence, all it's doing is copying the data from column B to column E. I know this sounds unnecessary, but it will be used for other purposes later. I'm just using it here to test out the concept. It's a structure that I learned from Eric W on the forum a couple years ago. As you can see on the attached image, it works fine until row 23, then it's not pulling the correct values. Column G is just comparing B and E. I've determined that the issue is in the COUNTIF portion of the formula, but I don't see what is wrong. Actually, I was never certain how that part of the formula worked, but it has in the past. Can anyone provide any insight as to the issue? Thanks a lot.
The formula in cell E23 is:
=IFERROR(INDEX($B$4:$B$74,AGGREGATE(15,6,(ROW($B$4:$B$74)-ROW(INDEX($B$4:$B$74,1))+1)/($A$4:$A$74=D23)/(COUNTIF($E$3:E22,$B$4:$B$74)=0),1)),"")
=IFERROR(INDEX($B$4:$B$74,AGGREGATE(15,6,(ROW($B$4:$B$74)-ROW(INDEX($B$4:$B$74,1))+1)/($A$4:$A$74=D4)/(COUNTIF($E$3:E3,$B$4:$B$74)=0),1)),"")
In essence, all it's doing is copying the data from column B to column E. I know this sounds unnecessary, but it will be used for other purposes later. I'm just using it here to test out the concept. It's a structure that I learned from Eric W on the forum a couple years ago. As you can see on the attached image, it works fine until row 23, then it's not pulling the correct values. Column G is just comparing B and E. I've determined that the issue is in the COUNTIF portion of the formula, but I don't see what is wrong. Actually, I was never certain how that part of the formula worked, but it has in the past. Can anyone provide any insight as to the issue? Thanks a lot.
The formula in cell E23 is:
=IFERROR(INDEX($B$4:$B$74,AGGREGATE(15,6,(ROW($B$4:$B$74)-ROW(INDEX($B$4:$B$74,1))+1)/($A$4:$A$74=D23)/(COUNTIF($E$3:E22,$B$4:$B$74)=0),1)),"")