Formula to refer to changing Column

  • Thread starter Thread starter Kenny Markhardt
  • Start date Start date
K

Kenny Markhardt

Column D
1 FieldName
2 =MATCH(D$1,INDIRECT($B$1&"!$A$2:$AZ$2"),0)
3 =MATCH($A$2,INDIRECT($B$1&"!$P:$P"),0)


Cell D2 finds the column with the correct data to use - In this case it's 16
or P - Could be anything from 1 to 50
Cell D3 then should find the starting row for the Column found in D2. -
Could be anything from 1 to 30,000
Need the formula in D3 to change depending on what D2 finds. i.e. hardcoded
$P:$P should change to $Q:$Q if D2 is 17
 
Perhaps try in D3 either:
=MATCH($A$2,OFFSET(A:A,,D2-1),0)

or

=MATCH($A$2,OFFSET(A:A,,
MATCH(D$1,INDIRECT($B$1&"!$A$2:$AZ$2"),0)-1),0)
 
Back
Top