Sumproduct function allow a lookup for one Date to check if it fallsin Date Range in other table


Dave K

Hello - I am trying compare the date for a given list of Unique Names
in one table (Table 1) to another table (Table 2) that has the Unique
Names (though there may be multiple instances in Table 2) along with a
From Date and Thru Date for each record (i.e., for each name).

I am hoping to come up with a formula that will allow me to confirm
when the date in Sheet1 finds a hit in sheet 2, meaning that the date
for a given name in Sheet 1 is within the From and Thru Dates in Sheet
2 (when there is a match on Name).

The below description will hopefully make it clear.

In Sheet1, I have the following Column Headers
(A) Unique_ID
(B) Date

In Sheet2, I have the following Column Headers:
(A) Unique ID
(B) From Date
(C) Thru Date
(D) NumerOfInterest

In Sheet 1, I am trying to place a lookup or sumproduct formula in
Column C that will give me the value in Column D in Sheet2, when there
is a "hit" (i.e., when the lookup name in sheet 1 matches Sheet2 AND
when the date in sheet 1 is between the effective dates in Sheet2.

The dates that are in play are numeric values in YYYYMM format, if it

Thanks for any suggestions or assistance!


hi Dave,



Le 2012-04-06 16:59, Dave K a écrit :

Dave K

Thanks so much for the response Isabelle - Do you happen to know why i
may be getting a "#Value!" results when i apply that formula?

I am using Excel 2010, if that makes a difference.

Dave K

Thanks so much for the reply.

Any thoughts as to why I am still getting a "#Value!" error when i
apply that formula?

Dave K

FYI, i did get it to work partly, but only if i apply all of the
formula, except for the last part (i.e., "*Sheet2!D2:D10")

So i get the resulting value "1" when a match is found (if i eliminate
that final clause in your formula). But i haven't been able to
generate the value in Column D in Sheet 2, since I had to drop that
last part of the formula.


just change the last part "Sheet2!D2:D10" for "Sheet2!$D$2:$D$10"


Le 2012-04-06 18:26, Dave K a écrit :

Dave K

that is great. thanks again isabelle!

One follow up. Is there a way to simply display the Value in Sheet2
Column D when there is a "hit", rather than show the summation of the
values in Column D?

In other words, your example shows the number 4 in Sheet1!C2. I
actually am trying to simply show an alphanumeric value for the first
hit, rather than sum up all of the values where there is a match.

So if the value "A12345" is in sheet2!D2, I want to be able to display
that value as the result of my formula in Sheet1!C2.

I am getting the #Value error instead.

Does that make sense? Hope i am not confusing you.


can you put an example of your data on this site "jumbofiles or cjoint or another", and give us the generated link


Le 2012-04-08 14:00, Dave K a écrit :

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question