title: Based on Cell.Value A vlookup row and get column based on Cell.Value B
body: <p>I have 2 tabs in my sheet, Main_Tab and Value_Tab.</p>
  <p>They look like this:</p>
  <p><strong>Main_Tab</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th></th>
  <th>A</th>
  <th>B</th>
  <th>C</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>Day</td>
  <td>Zipcode</td>
  <td>Price</td>
  </tr>
  <tr>
  <td>2</td>
  <td>Mo</td>
  <td>2332</td>
  <td>?A</td>
  </tr>
  <tr>
  <td>3</td>
  <td>Sa</td>
  <td>2332</td>
  <td>?B</td>
  </tr>
  <tr>
  <td>4</td>
  <td>Su</td>
  <td>2332</td>
  <td>?C</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><strong>Value_Tab</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th></th>
  <th>A</th>
  <th>B</th>
  <th>C</th>
  <th>D</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>Zipcode</td>
  <td>Mo / Fr</td>
  <td>Sa</td>
  <td>Su</td>
  </tr>
  <tr>
  <td>2</td>
  <td>4356</td>
  <td>1,10</td>
  <td>1,25</td>
  <td>2,08</td>
  </tr>
  <tr>
  <td>3</td>
  <td>6753</td>
  <td>1,09</td>
  <td>1,44</td>
  <td>1,98</td>
  </tr>
  <tr>
  <td>4</td>
  <td>2332</td>
  <td>1,29</td>
  <td>1,76</td>
  <td>2,15</td>
  </tr>
  <tr>
  <td>5</td>
  <td>8729</td>
  <td>1,19</td>
  <td>1,33</td>
  <td>2,01</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><a href="https://jsfiddle.net/dLbpn5au/2/" rel="nofollow noreferrer" title="Example of my sheets tabs">Fiddle</a></p>
  <p>Now the day is something I never know in advance, the user puts in the date and based from that date the A row (day row) fills in that day according to the entered date.</p>
  <p><strong>What do I want to achieve:</strong></p>
  <p>?A should display Value_Tab's B4 cell as in row 4 is the zipcode, and its a Mo so its column 2<br />
  ?B should display Value_Tab's C4 cell as in row 4 is the zipcode, and its a Sa so its column 3<br />
  ?C should display Value_Tab's D4 cell as in row 4 is the zipcode, and its a Su so its column 4</p>
  <p>I sas thinking in this direction but I'm using Excel expressions in VBA which of course won't work but I just want to show in what direction I'm thinking.</p>
  <pre><code>Sub CheckPrice()
      If Range(&quot;A2&quot;).Value == &quot;Mo t/m Fr&quot; Then
          =VLOOKUP(A4,Tarieven!ENTIRESHEET:ENTIRESHEET,2,0)
      ElseIf Range(&quot;A2&quot;).Value == &quot;Sa&quot; Then
          =VLOOKUP(A4,Tarieven!ENTIRESHEET:ENTIRESHEET,3,0)
      Else Range(&quot;A2&quot;).Value == &quot;Su&quot; Then
          =VLOOKUP(A4,Tarieven!ENTIRESHEET:ENTIRESHEET,4,0)
      End If
  End Sub
  </code></pre>
  <p>I hope I posted this right and that I'm clear.</p>