title: IF Statement to Fill a Cell based on a Reference
body: <p>This is a very weird request:</p>
  
  <p>I would like a VBA macro or an IF statement to read where a reference is pulled from and populate another cell showing where the cell was referenced.</p>
  
  <p>This is an inspection checklist for a part with hundreds of measurements and the data is pulled from about 7 different spreadsheets. The spec requires each value to have an inspection method to go along with it.  I realize I can do it individually, however, of course, the cells are referencing a different cell which would take customized IF statement for each which would not cut down on any time. I am trying to take this statement and apply it to dozens of other spreadsheets moving forward or else manual entry wouldn't be all too bad.</p>
  
  <p>For example:
  If the cell references a value from the Hard Gauge workbook, I would like the cell to the right of it to read "Hard Gauge," and if the cell is referencing a Height Gauge value, I would like the cell to the right of it to read "Height Gauge."</p>
  
  <blockquote>
    <p>Something like:</p>
  </blockquote>
  
  <pre><code>IF({File Path}[40452-1016 REV. A **(HEIGHT GAGE)**.xlsm] = TRUE, "HEIGHT GAUGE", IF({File Path}[40452-1016 REV. A **(HARD GAGE)**.xlsm] = TRUE, "HARD GAUGE",,))
  </code></pre>
  
  <p>I know the issue will be to ignore the cell value that comes after the "<code>.xlsm</code>"</p>
  
  <pre><code>{File Path}[40452-1016 REV. A (HEIGHT GAGE).xlsm]**'!$C$29**
  </code></pre>
  
  <p>Can someone help me or let me know if this is even a possibility. It doesn't necessarily have to be from an IF statement, a <code>VBA</code> macro will work just fine.</p>