Vlookup with extra criteria

daftwood

Board Regular
Joined
Feb 4, 2004
Messages
67
Hi, I've looked around but can't find anything that helps me solve my problem.

Source columns:

LookupText | SourceDate

Lookup columns:

LookupText | LookupDate | Value

I want to return Value where LookupText is the same and SourceDate is <= LookupDate

Any help would be very gratefully received!

Thanks

Martyn
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
There may be better ways of doing this, but this seems to work.

Assumptions:
Lookup data is in the range A1:C10, text in A, dates in B, values in C
Source data is in the range E1:F1, text in E, date in F
There is only ever one single value that matches the criteria of matching text, and date <= target.
IF more than one value matches the criteria, the values will be added together.

=SUMPRODUCT(--(A1:A10=E1),--(B1:B10<=F1),C1:C10)
 
Upvote 0
Thanks Gerald. Unfortunately I fall over at the assumption there's only ever one single value that matches!

However I think I might be able to get this to work for me by creating a sum of values based on LookupDate and LookupText in my Lookup sheet.
 
Upvote 0
I'd like the value that corresponds to the highest LookUp date so was going along the lines of sorting by LookupText then LookupDate descending.
 
Upvote 0
I'd like the value that corresponds to the highest LookUp date so was going along the lines of sorting by LookupText then LookupDate descending.
 
Upvote 0

Forum statistics

Threads
1,214,383
Messages
6,119,196
Members
448,874
Latest member
Lancelots

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top