title: Alternatives to a 300 value nested IF formula within Excel
body: <p>I receive Excel formatted returns from a DB (I have no control over) that present as in the pic below. I have to compile a 500 row report removing <code>Site Code</code> and replacing with the <code>Site Name</code>, in addition to adding the corresponding <code>City</code> and <code>State</code> in Excel. Rather than writing out an IF statement 300 times over for each value, what are the alternatives? I'd like to select the entire <code>Site Code</code> column, match it to the <code>Name</code>, and match it to the <code>City</code> and <code>State</code>.</p>
  <p>I can work out an IF statement for <code>Site</code>, <code>City</code>, and <code>State</code>, and add nested IF statements, but writing it out 300 times X 3 is not the way to go. Example: <code>=IF(C3=F3, G3, IF(C3=F4, G4...))</code></p>
  <p>I cannot find a way to select the entire F column and match it the the G column. I've tried <code>F1:F300</code> etc. but cannot get it to work.</p>
  <p>Any help is appreciated. If I'm looking for a different function let me know, I'd gladly do the research before posting again.</p>
  <p><a href="https://i.stack.imgur.com/Yw92g.png" rel="nofollow noreferrer">Sample Table</a></p>