adjusting formula get data between two dates

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,429
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
hello i have this formula works based on year, i would amend between two dates the result should be in column e based on column a after writting start date and end date in range e1,g1

1 (1).xlsx
ABCDEFG
1studentdatestart dateend date
2student12019/01/01
3student22019/03/01student
4student32019/05/01 
5student42019/07/01 
6student52019/09/01 
7student12019/11/01 
8student22020/01/01 
9student32020/03/01 
10student42020/05/01 
11student52020/07/01 
12student112020/09/01 
13student122020/11/01 
14student132021/01/01 
15student142021/03/01 
16student152021/05/01 
17student162021/07/01 
18student172021/09/01 
19student182021/11/01 
20student192022/01/01 
21student202022/03/01 
22student212022/05/01 
23student222022/07/01 
24 
Sheet1
Cell Formulas
RangeFormula
E4:E24E4=IFERROR(INDEX($A$2:$A$170, MATCH(0,COUNTIF($E$3:E3, IF(($E$1=YEAR($B$2:$B$170)), $A$2:$A$170, $E$3)), 0)), "")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
How about
...
=IFERROR(INDEX($A$2:$A$170, MATCH(0,COUNTIF($E$3:E3, $A$2:$A$170)+($B$2:$B$170<$E$1)+($B$2:$B$170>$G$1), 0)), "")
...

@Fluff It's very possible I'm missing something but wouldn't this need to be entered as an array formula using CSE?
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Oops, keep forgetting to do that.
@abdelfattah
As mentioned by Toadstool, the formula should be confirmed with Ctrl Shift Enter, not just enter.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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