title: VBA - Index / Match function with multiple criteria
body: <p>I am facing an issue when trying to compile a multiple criteria Index/Match code in VBA. This might be simple - but i am fairly new to VBA and nothing i have found around here worked.</p>
  
  <p>Example:
  I have a large amount of data in a specified range: <code>Sheets("CustomerAccounts").Range(CustomerSheetRange))</code> - I need VBA to return data from column titled "Values" by checking three criteria: Customer = X, Type = External, OriginCountry = UAE (columns are not adjacent in the original spreadsheet)
  The criteria are stored in separate variables set by user of the macro beforehand.</p>
  
  <pre><code>Customer   | Type      | Origin        | Destination        |  Values
  X          | Internal  | UAE           |  SA                |  Value 1
  Y          | Internal  | UAE           |  SA                |  Value 2
  X          | External  | UAE           |  SA                |  Value 3
  X          | External  | ZA            |  UAE               |  Value 4
  </code></pre>
  
  <p>At the moment i have the following (quite bulky) code which finds the value using one criteria - OriginCountry variable.
  The code searches for it in a pre-specified column - OriginCountryColumn.</p>
  
  <pre><code>ResultString = Application.Index(Sheets("CustomerAccounts").Range(CustomerSheetRange), Application.Match(OriginCountry, Sheets("CustomerAccounts").Range(OriginCountryColumn), 0), Application.Match("Values", Sheets("CustomerAccounts").Range(TitleRowCust), 0))
  </code></pre>
  
  <p>I would like to modify the code to also match the Type and The customer.
  Is it possible to expand the above Index/Matxh function - or should i use a different approach?</p>
  
  <p>Any advice is appreciated.</p>