check for startdate and enddate with input startdate and enddate then pull the data.

rockyhawkky

New Member
Joined
Jul 18, 2022
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi there, Here is my example, I got a chunk of data in sheet1 here, it's a task list contain start and end dates for each task. (it's comes from my calendar as power querry so it may fill up any times)
My Scheduel.xlsx
ABCD
1Start EndMy TaskPriority
222/10/202225/10/2022Task 1LOW
323/10/202224/10/2022Task 2LOW
424/10/202225/10/2022Task 3LOW
525/10/202228/10/2022Task 4LOW
626/10/202228/10/2022Task 5LOW
728/10/202228/10/2022Task 6HIGH
824/10/202227/10/2022Task 7LOW
919/10/202225/10/2022Task 8LOW
1021/10/202230/10/2022Task 9LOW
1126/10/202231/10/2022Task 10LOW
Sheet1

and i have sheet2 it's has a input as select week.
My Scheduel.xlsx
ABCDEF
1StartEndMy Task This WeekPriorityWeekStartWeekEnd
222/10/202228/10/2022
Sheet2
Cell Formulas
RangeFormula
F2F2=E2+6

So I want to pull data that is in range of my selected start(E2) and end(F2) week to display in sheet2 and also want to pull the data that is past my selected week too. in this case, as you can see task8,task9,task10 it start or end dates are in another week but it has an activity going on in selected week so I also want to display them in sheet2.

Any help will be appreciated, Thank you.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Cell Formulas
RangeFormula
A2:D32A2=IFERROR(INDEX(Sheet1!A:A,AGGREGATE(15,6,ROW(Sheet1!$A$2:$A$11)/(Sheet1!$A$2:$A$11<$E$2)/(Sheet1!$B$2:$B$11>=$E$2),ROWS($1:1))),"")
F2F2=E2+6
 
Upvote 0
@bebo021999
thank for the idea
sorry i mean "passed" not "past" and my table was wrong.

here is correct table for demonstrate
Book2.xlsx
ABCD
1Start EndMy TaskPriority
222/10/202225/10/2022Task 1LOW
318/10/202220/10/2022Task 2LOW
424/10/202225/10/2022Task 3LOW
529/10/202231/10/2022Task 4LOW
626/10/202228/10/2022Task 5LOW
728/10/202228/10/2022Task 6HIGH
824/10/202227/10/2022Task 7LOW
919/10/202225/10/2022Task 8LOW
1021/10/202230/10/2022Task 9LOW
1126/10/202231/10/2022Task 10LOW
Sheet1

1666848306651.png

just wan't to pull data that match any of case A or B or C or D
case E or F are not in period of select week.

or by reverse just pull everything that doesn't match E or F case
with new table above task2 and task4 are not in period of select week my result should be like this
Book2.xlsx
ABCDEF
1StartEndMy Task This WeekPriorityWeekStartWeekEnd
222/10/202225/10/2022Task 1LOW22/10/202228/10/2022
324/10/202225/10/2022Task 3LOW
426/10/202228/10/2022Task 5LOW
528/10/202228/10/2022Task 6HIGH
624/10/202227/10/2022Task 7LOW
719/10/202225/10/2022Task 8LOW
821/10/202230/10/2022Task 9LOW
926/10/202231/10/2022Task 10LOW
Sheet2
Cell Formulas
RangeFormula
F2F2=E2+6
 
Upvote 0
Again:
Cell Formulas
RangeFormula
A2:D9A2=IFERROR(INDEX(Sheet1!A:A,AGGREGATE(15,6,ROW(Sheet1!$A$2:$A$11)/((Sheet1!$A$2:$A$11>$F$2)+(Sheet1!$B$2:$B$11<$E$2)=0),ROWS($1:1))),"")
F2F2=E2+6
 
Upvote 0
Solution

Forum statistics

Threads
1,224,814
Messages
6,181,124
Members
453,021
Latest member
Justyna P

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