title: Excel: Value from one cell based on max value with multiple criteria in other column
body: <p>I am trying to get value in column 8, based on MAX value (column Range4) with multiple criteria (Range1, Range2, Range3), but excel gives me an error "#N/A". Where is the mistake?</p>
  
  <pre><code>VLOOKUP(MAX(IF(Range1=2013;IF(Range2="april";IF(Range3="Alexa";Range4))));Range5;8;FALSE)
  </code></pre>
  
  <p>The part </p>
  
  <pre><code>{MAX(IF(Range1=2013;IF(Range2="april";IF(Range3="Alexa";Range4))))} 
  </code></pre>
  
  <p>works right alone (it gives me the right value), but not inside the VLOOKUP function.</p>
  
  <p>Thanks!</p>
  
  <p><em>Sample data set for testing:</em></p>
  
  <pre><code>First_day   Last_day    Week_Num    Week_Range  Month   Year    Rank_name   Rank_value
  01/04/2013  07/04/2013  14  1-7 april   april   2013    Alexa   10122
  08/04/2013  14/04/2013  15  8-14 april  april   2013    Alexa   9670
  15/04/2013  21/04/2013  16  15-21 april april   2013    Alexa   9130
  22/04/2013  28/04/2013  17  22-28 april april   2013    Alexa   8340
  29/04/2013  05/05/2013  18  29-5 april  april   2013    Alexa   7543
  31/03/2014  06/04/2014  14  31-06 april april   2014    Alexa   11428
  07/04/2014  13/04/2014  15  07-13 april april   2014    Alexa   7159
  14/04/2014  20/04/2014  16  14-20 april april   2014    Alexa   7027
  21/04/2014  27/04/2014  17  21-27 april april   2014    Alexa   6675
  28/04/2014  04/05/2014  18  28-04 april april   2014    Alexa   5379
  </code></pre>
  
  <p>Equivalence between ranges and columns:</p>
  
  <ul>
  <li>Range1 = Column "Year"</li>
  <li>Range2 = Column "Month"</li>
  <li>Range3 = Column "Rank_name"</li>
  <li>Range4 = Column "Week_Num"</li>
  <li>Range5 = Column "Rank_value"</li>
  </ul>