Hi, madocar!
An alternative without using macros, but using a formula for each worksheet Direct, Referring & Search:
Direct!C2: =INDIRECTO(DIRECCION(COLUMNA()-1;2;4;1;$B2)) -----> in english: =INDIRECT(ADDRESS(COLUMN()-1,2,4,1,$B2))
Referring!C2: =INDIRECTO(DIRECCION(COLUMNA()-1;3;4;1;$B2)) -----> in english: =INDIRECT(ADDRESS(COLUMN()-1,3,4,1,$B2))
Search!C2: =INDIRECTO(DIRECCION(COLUMNA()-1;4;4;1;$B2)) -----> in english: =INDIRECT(ADDRESS(COLUMN()-1,4,4,1,$B2))
An alternative without using macros, using a unique formula for all 3 worksheets, but using a helper cell:
Direct!A1: 2
Referring!A1: 3
Search!A1: 4
<any_of_the_3>!C2: =INDIRECTO(DIRECCION(COLUMNA()-1;$A$1;4;1;$B2)) -----> in english: =INDIRECT(ADDRESS(COLUMN()-1,$A$1,4,1,$B2))
You could place helper cell anywhere within each worksheet and eventually setting font color equal to background.
In both cases copy C2 across & down as required.
Just advise if any issue.
Regards!