
Originally Posted by
Glenn Kennedy
I just noticed that you want a macro. Blast!!! Here's a formula. Give it a go!!
helper in start F2, copied down:
=LEN(C2)-LEN(SUBSTITUTE(C2,"-",""))+1
End, A2 copied across to E2 and then down:
=IFERROR(INDEX(Start!A$2:A$26,MATCH(0,INDEX(--(COUNTIF(A$1:A1,Start!A$2:A$26)=Start!$F$2:$F$26),0),0)),"")
Overtype this into C2 and copy down:
=IFERROR(TRIM(MID(SUBSTITUTE("-"&INDEX(Start!C$2:C$26,MATCH(0,INDEX(--(COUNTIF($A$1:$A1,Start!$A$2:$A$26)=Start!$F$2:$F$26),0),0)),"-",REPT(" ",125)),125*COUNTIF($A$2:$A2,$A2),125)),"")
Bookmarks