Share via

search within date range to return multiple values

Anonymous
2015-11-11T10:02:14+00:00

I want a formula that will allow me to return ALL the items in column D between two dates (eg 1/07/2015 and 3/08/2015). Thanks

8/07/2015 7 76274 CORNFLOUR $10.21
14/07/2015 7 2072 CAKE TOPPINGS 100'S & 1000'S NON PAREILS $6.09
14/07/2015 7 99074 HAM LEG 97% FAT FREE SHAVED $14.57
22/07/2015 7 148057 CUSTARD UHT VANILLA $2.76
22/07/2015 7 34764 COFFEE GRANULATED FOODSERVICE BLEND $38.39
22/07/2015 7 58789 COOKIES P/C OATMEAL TWIN $15.25
4/08/2015 8 11156 CORN CHIPS ROUND $19.50
4/08/2015 8 49200 CHEESE SHREDDED TASTY PREMIUM $15.80
10/08/2015 8 6145 PEAS CORN & CAPSICUM $8.78
10/08/2015 8 138870 PEACHES HALVES IN JUICE $8.29
17/08/2015 8 128548 BREAD LOAF WHITE LARGE GLUTEN FREE F/B $31.84
17/08/2015 8 20781 CONTAINER RECTANGLE CR1000 $5.37
Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Ashish Mathur 101.9K Reputation points Volunteer Moderator
2015-11-12T00:29:33+00:00

Hi,

Enter this array formula (Ctrl+Shift+Enter) in cell I2 and copy down

=IFERROR(INDEX($D$2:$D$13,SMALL(IF($A$2:$A$13>=$G$2,IF($A$2:$A$13<=$G$3,ROW($A$2:$A$13)-ROW($A$1))),ROW(1:1)),1),"")

Here's a screenshot

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Vijay A. Verma 104.9K Reputation points Volunteer Moderator
2015-11-11T10:30:44+00:00

Refer to below snip. Dates in G1 and G2 and formula in I1 is following which should be dragged down -

=IFERROR(INDEX($D$1:$D$12,AGGREGATE(15,6,(ROW($D$1:$D$12)-ROW($D$1)+1)/(($A$1:$A$12>=$G$1)*($A$1:$A$12<=$G$2)),ROWS($1:1))),"")

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Ashish Mathur 101.9K Reputation points Volunteer Moderator
    2015-11-12T05:39:21+00:00

    You are welcome.  If my reply helped, please mark it as Answer.  Have you tried creating a Pivot Table and then filtering the data column in the Pivot Table.  It will be a far easier approach.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-11-12T05:33:45+00:00

    Thank you, works really well

    Am hoping to add some levels of formulae now...

    1. To make sure column I does not repeat values
    2. To sum column E values in column J that are linked to the values if column I

    Cheers

    Was this answer helpful?

    0 comments No comments