Require Formula Help

Ron99

Active Member
Joined
Feb 10, 2010
Messages
340
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I have 2 set of data, one is the source data and the other is output.

Below is the source data
pndt1dt2
110​
11-Jan-19​
20 May 2019​
109​
10-Jan-19​
19 May 2019​
101​
9-Jan-19​
18 May 2019​
107​
8-Jan-19​
17 May 2019​
106​
7-Jan-19​
16 May 2019​
101​
6-Jan-19​
15 May 2019​
104​
5-Jan-19​
14 May 2019​
103​
4-Jan-19​
13 May 2019​
102​
3-Jan-19​
12 May 2019​
101​
02 January 2019​
11 May 2019​

1ST COLUMN are the part numbers, 2nd and 3rd column are dates

OUTPUT DATA
pndt1Output
101​
12 May 2019​
TRUE​
102​
03 January 2019​
103​
04 January 2019​
104​
05 January 2019​
105​
06 January 2019​
106​
07 January 2019​
107​
08 January 2019​

The formula that I require is there are part numbers in the output data which needs to lookup from the source data and check by row if the date falls within the range if yes, then the formula should return value as true.

For example - PN 101, Date - 12 May 2019,
Source data has PN 101 in row 3, 6 & 10. The formula should lookup each row and check if the date range falls within the given date, if yes then "true" if not "false".
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Try putting this in C3 of Output sheet.

=AND(VLOOKUP(A2, Source!$A$1:$C10), 2, False) <= B2, B2<=VLOOKUP(A2, Source!$A$1:$C10), 3, False) )
 
Upvote 0
I noticed that the VLOOKUP function just looks up the first data source, I have data where the 1st row data's date is year 2020 but the second one falls within the range, whereas the current function is unable to identify that.
 
Upvote 0
Thank you sir. I appreciate it, This function now captures any date range.
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

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