• 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.

Lookup between days

Shabbo

Member
Dear Sir,
I wanted to apply lookup from entry book to toll sheet for finding entry number.
But the problem is that dates are not same in both sheet for same vehicle number.
Example if Entry book has vehicle no: AB04CV4157 loaded on 18-1-2021 and after that has same vehicle loaded on 25-1-2021 then the entry number should come in toll sheet between 18-1-21 to 24-1-21.
Next Vehicle no: AB04CV4157 loaded on 25-1-2021 and after that Vehicle has loaded on 29-1-2021 then in toll sheet entry number will come 25-1-2021 to 28-1-2021.
It means lookup to apply for in between days please advice.
 

Attachments

  • excel question.xlsx
    8.9 KB · Views: 15
I hope the column D is are your expected results Right? If yes

See left side screenshot where there is no A506997 entry no for AB04CV4158...

Then how as per right side screenshot row 7 you gave entry no of A506997 to that vehicle number?

73519 73520

Also, the AB04CV4158 entry book first entry date is 28-Jan-2021 but how you got the entry number on 27-Jan-2021 in the toll sheet?
 
Dear Sir,
Thanks for help,
I have attached revised sheet, there was one typing mistake.
But my question is that toll is deducted same day or next day or day after next day but till the vehicle is loaded next trip the toll should be counted into previous trip only.
For example if today is 27th February 2021 and vehicle is loaded today but next date of loading is 2nd March 2021 then toll charges between 27th February 2021 to 1st March 2021 should go to entry number of 27th February 2021.
I tried to put IFERROR then -1 and IFERROR then again -1 and if error then again -1 (-1 indicates 1 day before from current date) but Vlookup is giving erorr if I give -1.
 

Attachments

  • excel question.xlsx
    9.3 KB · Views: 3
Back
Top