• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Date Comparison (Values of the nearest date)

Nishant859_1

New Member
Hello,Friends,

Need Urgent Solution

I have 2 Table mention below, one is Table 1 which is master data & second is Table 2 i which I need value (column C) from Table 1
Criteria is value of nearest date in Table 1 correspond to date in Table 2
Example :- in Table 2 result,
16th Apr & 21 May is 1 because nearest date in Table 1 is 1st Apr
3 June is 2 because 1 June in Table 1 is nearest
Pls. Consider :- Size of sheet is very high & line item are around 90,000 so cant use Looping or array formulas


upload_2017-8-21_19-27-0.png


upload_2017-8-21_19-27-34.png
 

Attachments

  • upload_2017-8-21_19-26-33.png
    upload_2017-8-21_19-26-33.png
    5.9 KB · Views: 5
  • Sample Data.xlsx
    8.9 KB · Views: 5
Hi ,

May 21 is closer to June 1 than it is to April 1.

Similarly , isn't August 3 closer to August 1 than it is to June 1 ?

Narayan
 
Hi ,

I am sorry but those 7 words explain nothing to me.

Hopefully someone else will understand your requirement and respond.

Narayan
 
I mean to say previous closer date

May 21 is closest previous(or past) date in Table 1 is April 1.

Similarly , August 3 closest previous(or past) date is August 1.
 
Hi ,

But your explanation now contradicts the values you have shown in the worksheet ; if August 3 is the closest date to August 1 , then against August 3 in Table 2 , we should have a value of 4.

Can you clarify ?

Narayan
 
A2 is Material & I2 is date

i tried VLOOKUP(table2'A2&table2'I2,Range in Table 1,12,1)

& INDEX('Range in Table 1,MATCH(column in table 2 value concatenate of material & date,column in table 1 value concatenate of material & date,1),12)
 
Hi ,

See the attached file. There are two different formulae in column H and column I ; the one in column H can be used if only the date is to be matched ; the one in column I matches both date and material.

Narayan
 

Attachments

  • Sample Data.xlsx
    9.4 KB · Views: 9
Back
Top