hey thanks for reply, it does what i need it to do apart from remove the spaces, but i manage to work it out using vlookups.
=IF(D3="","",IF(VLOOKUP(D3,Staff!$A$2:$O$2000,9,FALSE)="Yes",D3,""))
then removed blanks using
=IF(ROW() -ROW($B$20:$B$29)+1>ROWS($R$3:$R$19) - COUNTBLANK($R$3:$R$19),"",INDIRECT(ADDRESS(SMALL((IF($R$3:$R$19<>"",ROW($R$3:$R$19),ROW()+ROWS($R$3:$R$19))),ROW()-ROW($B$20:$B$29)+1),COLUMN($R$3:$R$19),4)))
theses were used on my actual sheet not the example one, but it worked.
thanks for ur help anyway.
Bookmarks