title: Excel formula that combines MATCH, INDEX and OFFSET
body: <p>I am having trouble with an Excel-function.</p>
  
  <p>On sheet A I want to get the value of a cell that is located x-columns to the right of cell F2.
  X is a variable number and is determined by the value of cell A1. Currently, the value is 5.</p>
  
  <pre><code>=(OFFSET(sheetA!F2,0,sheetA!A1))
  </code></pre>
  
  <p>This formula works. However, I want to include this function into a MATCH and INDEX function that is located on another sheet (B).</p>
  
  <p>I know that I can use the following formula to get value of $F$2</p>
  
  <pre><code>INDEX(sheetA!F:F,MATCH(sheetB!C4,sheetA!A:A,0))
  </code></pre>
  
  <p>Combining them, results in the following formula: </p>
  
  <pre><code>=INDEX((OFFSET(sheetA!F2,0,sheetA!A1)),MATCH(sheetB!C4,sheetA!A:A,0))
  </code></pre>
  
  <p>This formula generates a #REF!-value.</p>
  
  <p>If I evaluate the formula, I see the following steps:</p>
  
  <pre><code>=INDEX((OFFSET(sheetA!$F$2,0,5)),MATCH(sheetB!C4,sheetA!A:A,0))
  =INDEX((sheetA!$K$2),MATCH(sheetB!C4,sheetA!A:A,0))
  =INDEX((sheetA!$K$2),MATCH("BTC",sheetA!A:A,0))
  =#REF!
  </code></pre>
  
  <p><em>Why do I want to use MATCH and INDEX?</em>
  Because while the values on sheet A are "fixed", the values of sheetB!C4 are floating/variable. Therefore, I need to locate the correct row first. The correct column can be done with the offset-part.</p>
  
  <p>Thank you for your help.</p>