Hi all and congratulations for all the help you are providing
here is my problem
I have two tables
one which has two columns and the another with three columns
It is basically like this
Table 1 __________ _________________________ Table 2
A_______________ B ____________ F _______________G___________ H
Number_________Time__________Number ________ Time _________ Value
1 __________ 14:02:00 __________ 2 __________ 14:03:30 _________ 7
2 __________ 14:05:00 __________ 5 __________ 14:04:00 _________ 10
3 __________ 14:08:00 __________ 1 __________ 14:07:00 _________ 15
4 __________ 14:10:30 __________ 4 __________ 14:11:30 _________ 4
5 __________ 14:12:00 __________ 3 __________ 14:13:00 _________ 2
As you noticed the time columns in the two tables are not exactly matching.
What I want to do is the following
match the number columns from table 1 with the number columns from table 2 AND match the Time column from table 1 with the Time column in Table 2 and then get whatever is in the Value column of table 2 as a result.
My main problem is that the times are not absolute matches. Therefore I have to implement a check that matches the Number columns and then matches the Time columns based on their proximacy and afterwards returns the value on the Value column (table 2).
I tried the sumproduct function but I can't seem to be able to implement the > or < signs so that I could possible have something like this:
=SUMPRODUCT(--(A1:A5=F1:F5),--(H1:H5<C1:C5),G1:G5)
or
=SUMPRODUCT(--(A1:A5=F1:F5),--(H1:H5<C1+TIME(0,5,0)),G1:G5
I tried the second formula to add some slack time in the table 2 Time column in case it would help the calculations (sometimes the Time value in Table 1 might be equal or slightly higher than the Time value in Table 2, so I want to be able to add an extra -standard- time in minutes to the Time column in Table 2).
So basically I want something that calculates this
IF the Number column in Table 1 is equal to the Number column in Table 2 _AND_ the Time column in Table 1 is between a 15 minute proximity with the Time column in Table 2, give me the value in the Value column in Table 2.
So , any ideas ? I would be grateful!
Bookmarks