简体   繁体   中英

Excel - How to select / filter today's date from date range?

I have a project plan made in excel. It has items with their start date & end dates in 2 different columns. Say item-A starts on 20-Sep & ends on 28-Sep .

Every day I need to view items which need to be done today. So if today is 25-Sep , I need to see/filter all items which fall in that date range (Eg item-A).

How do I filter that?

Item     Start Date     End Date
A        20-Sep         28-Sep
B        15-Sep         24-Sep
...
...

Say my testing data is like this.

        A       B       C       D
 1    Item    Start    End
 2      A    20-Sep  28-Sep
 3      B    15-Sep  24-Sep
 4      C    23-Sep  02-Oct

I came up with 2 methods. First is conditional formatting, the other is an autofilter.

Conditional Formatting

Selecting A2, and formatting by formula: =AND(TODAY()>=$B2,TODAY()<=$C2) Then setting the format such as changing its interior color, and apply this to all your data range.

Autofilter

We have to use an extra column for the condition to filter. Type =AND(TODAY()>=$B2,TODAY()<=$C2) into D2, and autofilter it with value TRUE .

Autofilter-2

An autofilter can filter the date directly. You can set up the criteria of column B to before or equal to the date of today, and set up column C for after or equal to the date of today. However this has to be done by manual except using a macro, and I'm not using Eng. version excel so it's difficult for me to tell you which button step by step.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM