如何在Excel中今天之前或之后過濾所有日期單元格?

      網(wǎng)友投稿 464 2025-03-31

      如何在Excel中今天之前或之后過濾所有日期單元格?

      在本文中,我將討論如何過濾Excel工作表中今天之前或之后的所有日期單元格。


      使用過濾器功能過濾今天之前或之后的所有日期單元格

      使用VBA代碼過濾今天之前或之后的所有日期單元格

      使用過濾器功能過濾今天之前或之后的所有日期單元格
      驚人的! 在 Excel 中使用高效的選項(xiàng)卡,如 Chrome、Firefox 和 Safari! 每天節(jié)省50%的時(shí)間,并減少數(shù)千次鼠標(biāo)單擊!

      實(shí)際上,Excel中的篩選器功能可以幫助您盡快解決此任務(wù),請執(zhí)行以下操作:

      1。 選擇您要篩選的日期列,然后單擊 Data > 篩選器,請參見屏幕截圖:

      2。 然后單擊下拉箭頭,然后選擇 日期過濾器 > 之前 / 根據(jù)需要,請參見屏幕截圖:

      如何在Excel中今天之前或之后過濾所有日期單元格?

      3。 在 自定義自動篩選 對話框,單擊 日期選擇器 按鈕,然后單擊 的旅程 日期選擇器日歷中的按鈕,請參見screesnhot:

      4。 然后點(diǎn)擊 OK 關(guān)閉對話框,并過濾掉今天之前或之后的所有日期,如下所示的屏幕截圖:

      使用VBA代碼過濾今天之前或之后的所有日期單元格

      以下VBA代碼還可以幫助您過濾工作表中當(dāng)天之前或之后的所有日期。 請執(zhí)行以下步驟:

      1。 按住 ALT + F11 鍵打開 Microsoft Visual Basic應(yīng)用程序 窗口。

      2。 點(diǎn)擊 插頁 > 模塊,然后將以下代碼之一粘貼到 模塊 窗口。

      VBA代碼:過濾今天之前的所有日期單元:

      Sub FilterDateBeforeToday() Dim xLastRow As Long Dim xRg As Range On Error Resume Next Set xRg = Application.InputBox("Please select filtered column:", "KuTools for Excel", Selection.Address, , , , , 8) If xRg Is Nothing Then Exit Sub Application.ScreenUpdating = False ActiveSheet.AutoFilterMode = False If xRg.Count = 1 Then Set xRg = xRg.CurrentRegion xRg.AutoFilter 1, "<" & CDbl(Date) Application.ScreenUpdating = True End Sub
      Copy
      VBA code: Filter all date cells after today: Sub FilterDateBeforeToday() Dim xLastRow As Long Dim xRg As Range On Error Resume Next Set xRg = Application.InputBox("Please select filtered column:", "KuTools for Excel", Selection.Address, , , , , 8) If xRg Is Nothing Then Exit Sub Application.ScreenUpdating = False ActiveSheet.AutoFilterMode = False If xRg.Count = 1 Then Set xRg = xRg.CurrentRegion xRg.AutoFilter 1, ">" & CDbl(Date) Application.ScreenUpdating = True End Sub 3. After copying and pasting one of the above codes, then press F5 key to run this code, and a prompt box will pop out to remind you selected the date column that you want to filter, see screenshot: 4. And then click OK button, all date cells which before or after today will be filtered out immediately. Best Office Productivity Tools Transform Hours into Minutes with Kutools for Excel! Ready to supercharge your Excel tasks? Harness the power of Kutools for Excel - your ultimate time-saving tool. Streamline intricate tasks and glide through your data like a pro. Experience Excel at lightning speed! Why You Need Kutools for Excel ??? Over 300 Powerful Features: Kutools is packed with more than 300 advanced features, simplifying your work in over 1500 scenarios. ?? Superior Data Processing: Merge cells, remove duplicates, and perform advanced data conversions – all without breaking a sweat! ?? Efficient Batch Operations: Why put in extra effort when you can work smart? Import, export, combine, and tweak data in bulk with ease. ?? Customizable Charts and Reports: Access a broad variety of additional charts and generate insightful reports that tell a story. ??? Powerful Navigation Pane: Gain an advantage with the robust Column Manager, Worksheet Manager, and Custom Favorites. ?? Seven Types of Drop-down Lists: Make data entry a breeze with drop-down lists of various features and types. ?? User-Friendly: A breeze for beginners and a powerful tool for experts. Download Now and Soar Through Time with Excel! Read More... Free Download... Purchase... Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project. Open and create multiple documents in new tabs of the same window, rather than in new windows. Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day! Read More... Free Download... Purchase...

      版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實(shí)的內(nèi)容,請聯(lián)系我們jiasou666@gmail.com 處理,核實(shí)后本網(wǎng)站將在24小時(shí)內(nèi)刪除侵權(quán)內(nèi)容。

      版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實(shí)的內(nèi)容,請聯(lián)系我們jiasou666@gmail.com 處理,核實(shí)后本網(wǎng)站將在24小時(shí)內(nèi)刪除侵權(quán)內(nèi)容。

      上一篇:07excel表格怎么排序
      下一篇:【Docker】Dockerfile的常用指令
      相關(guān)文章
      亚洲人色大成年网站在线观看| 亚洲午夜久久久精品影院| 亚洲精品成人久久| 亚洲啪啪AV无码片| 国产亚洲蜜芽精品久久| 国产成人精品日本亚洲语音| 亚洲精华国产精华精华液 | 亚洲欧洲日本在线观看| 亚洲av无码专区在线| 亚洲人成在线中文字幕| 亚洲av片不卡无码久久| 亚洲av专区无码观看精品天堂| 亚洲人成免费电影| 亚洲精品人成网在线播放影院| 最新亚洲春色Av无码专区| 亚洲砖码砖专无区2023| 亚洲区日韩精品中文字幕| 亚洲国产精品精华液| 亚洲av中文无码字幕色不卡| 亚洲AV网一区二区三区| 亚洲国产成人无码AV在线影院| 亚洲AV无码专区亚洲AV桃| 青青青国产色视频在线观看国产亚洲欧洲国产综合 | 亚洲三区在线观看无套内射| 亚洲日韩欧洲乱码AV夜夜摸| 久久九九亚洲精品| 久久久久久亚洲精品成人| 亚洲成年人电影网站| 亚洲国产精品综合久久20| 在线观看日本亚洲一区| 日本亚洲欧美色视频在线播放| 亚洲av无码天堂一区二区三区 | 亚洲国产成人精品无码区在线网站 | 亚洲熟女少妇一区二区| 亚洲成AV人片天堂网无码| 亚洲精品美女久久久久9999| 亚洲国产乱码最新视频| 精品无码专区亚洲| 亚洲人成国产精品无码| 国产亚洲精品自在久久| 亚洲黄色在线网站|