View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default multiple selection

Assuming you have these listed in F2:F3
AL14927021
AL14928383

Put in G2, normal ENTER to confirm:
=IF(MATCH(1,INDEX((A$2:A$14=F2)*(E$2:E$14="PC"),), 0)-MATCH(F2,A$2:A$14,0)+1<=4,"PC","")

Copy G2 down to derive the expected results, viz:

AL14927021 <nothing
AL14928383 PC

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
---
"AND" wrote:
OK...Here the list:
A B C D
E
LVSNR date time AKAVZ AKCOD
AL14927021 1002 1658 27 TO1
AL14927021 1002 1916 16 TO1
AL14927021 1102 0710 01 PER
AL14927021 1102 0710 01 AT
AL14927021 1102 2057 21 PC
AL14927021 1202 0256 21 PC
AL14927021 1202 0816 01 AT
AL14927021 1202 0816 01 PER
AL14927021 1202 0920 03 AT
AL14928383 1002 2123 16 TO1
AL14928383 1002 2125 16 TO1
AL14928383 1102 0422 21 PC
AL14928383 1102 0803 01 PER


F2: (for AL14927021 PC is not at the first 4 rows, so I have to see nothing)
F3: (FOR AL14928383 pc is at the first 4 rows, so the result is): PC