Hi Donna,
No, the '1' is nothing to do with the second instance. It's just indicating which column to use in the range defined by the INDEX() function.
For the second instance you need to use a modified formula in J5, since you want the Index to start at the row after the row which contains the first instance.
So in J5 and copied down...
=IFERROR(INDEX(OFFSET('RAW DATA'!$Y$1:$Y$100,MATCH($B5,'RAW DATA'!$X:$X,FALSE),0),MATCH(B5,OFFSET('RAW DATA'!$X$1:$X$100,MATCH($B5,'RAW DATA'!$X:$X,FALSE),0),FALSE),1),"")
One further thought. If you're wanting the 3rd, 4th etc visits you may be better advised to use a Pivot Table which will give you much more flexibility. Or alternatively consider a Data Filter Advanced.
Regards
Bookmarks