title: Finding Excel cell reference using Python
body: <p><a href="http://i.stack.imgur.com/fwVen.png" rel="nofollow">Here is the Excel file in question:</a></p>
  
  <p>Context: I am writing a program which can pull values from a PDF and put them in the appropriate cell in an Excel file.</p>
  
  <p>Question: I want to write a function which takes a column value (e.g. 2014) and a row value (e.g. 'COGS') as arguments and return the cell reference where those two intersect (e.g. 'C3' for 2014 COGS).</p>
  
  <pre><code>def find_correct_cell(year=2014, item='COGS'):
      #do something similar to what the =match function in Excel does
      return cell_reference #returns 'C3'
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/8N9RE.png" rel="nofollow">I have already tried using openpyxl like this to change the values of some random empty cells where I can store these values:</a></p>
  
  <pre><code>    col_num = '=match(2014, A1:E1)'
      row_num = '=match("COGS", A1:A5)'
  </code></pre>
  
  <p>But I want to grab those values without having to arbitrarily write to those random empty cells. Plus, even with this method, when I read those cells (F5 and F6) it reads the formulae in those cells and not the face value of 3.</p>
  
  <p>Any help is appreciated, thanks.</p>