# Note lookup with 2 conditions

#### Kerrold

##### New Member
Hi I have a table that has
Col A = Date
Col B = Customer name
Col C = Product
Col D = Note

I need a formula that will populate a cell with the relevant note in a separate worksheet based on the most recent note (based on date added)
for customer x and product y

For example if cell B8 = customer x and cell E7 = product y then the most recent note added for that is ???

### Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

#### FDibbins

##### Well-known Member
Hard to say without seeing more detail on what you are working with, but I would probably add a helper column and combine Customer and Product, then use INDEX/MATCH based on that combo and search for the MAX date

#### mfexcel

##### Well-known Member
Here's an article for your reference.
Perform VLOOKUP with 2 lookup values | wmfexcel

Hi I have a table that has
Col A = Date
Col B = Customer name
Col C = Product
Col D = Note

I need a formula that will populate a cell with the relevant note in a separate worksheet based on the most recent note (based on date added)
for customer x and product y

For example if cell B8 = customer x and cell E7 = product y then the most recent note added for that is ???

#### Kerrold

##### New Member
Thank you for the link mfxcel, greatly appreciated! I used the Index Match formula as follows

=INDEX(Notes!H:H,MATCH(1,(Notes!F:F=Summary!B8)*(Notes!G:G=Summary!F7),0))

#### mfexcel

##### Well-known Member
You are welcome. Glad that it helps.
btw, try not to use whole column referencing.

Thank you for the link mfxcel, greatly appreciated! I used the Index Match formula as follows

=INDEX(Notes!H:H,MATCH(1,(Notes!F:F=Summary!B8)*(Notes!G:G=Summary!F7),0))