weizer
weizer

Reputation: 1117

How to sort a range of data based on the date i excel?

enter image description here

Hi everyone,

I used the AGGREGATE function to extract out the row with complete status as shown in the output (J3:M8). I'm thinking to sort the rows based on the Ending Date, but I'm not sure how to do it by applying the sorting function together with aggregate & Index function. I also want to avoid turning the range of data into Table format. Is there any way to do it? Or at least using VBA to achieve this purpose (preferably not using VBA, if there is no other way then VBA is fine for me)?

Upvotes: 0

Views: 466

Answers (1)

Harun24hr
Harun24hr

Reputation: 36880

You can use Sort() function with Filter() formula like below

=SORT(FILTER(D5:H11,H5:H11="Complete"),3)

Here 3 is sort index of column of return array means Ending Date with default sort order Ascending. If you want to sort in descending order then use Sort Order -1 option of SORT() function.

=SORT(FILTER(D5:H11,H5:H11="Complete"),3,-1) 

enter image description here

Upvotes: 1

Related Questions