Hi diana,
Good to hear you back over here.
The formula you posted above is not right, see below blue portion added.
=tables!$S$2:INDEX(tables!$S$2:$S$100000,MATCH(TRUE,tables!$S$2:$S$100000="",0)-1)
is used to generate dynamic range for Group 1 & Group 2.
INDEX function when used in refrence to another cell refrence return a refrence.
What I mean to say, if you look at the formula tables!$S$2:INDEX..... , so INDEX is in refrence with tables!$S$2.
Now your List of say Group 1 starts with S2 cell on Sheet "tables", and you want the complete list of names in those list to be used in some formula say like a lookup array. So let us assume, at present there are 10 names in the list. So the range of those names will be S2:S12. But what, if you add an extra name in future. You need to change the cell refrences in all the formulas to work.
So the solution is to make a dynamic named range which will update automatically.
So, here INDEX function will return the cell ref. of the cell having last value in the array tables!$S$2:$S$100000. To know the last cell with value, MATCH(TRUE,tables!$S$100000="",0)-1 this part of the formula is used. It is assumed that list will not have blanks in between them, so match will return the row number of first cell having blank in the array S2:S100000.
Say in our example S13 will be blank so match will return 12 as the 12th row in the array is the first blank cell. Now if we -1 from 12 to get the last row with a value in it.
now INDEX function should return the value in that row, but it is used in the ref. of other cell so it will return the ref. to that cell , so the result will be S12.
Column B & Column C are array formulas, so after entering the formula you must enter with Ctrl+Shift+Enter, and not just enter. To see that you had pressed the right keystroke to execute the formula, look at the formula bar, you can see { } around the formulas.
Hope this will clear your doubt as well as issue, if still you require any further assistance write back.
Regards,