ไปยังเนื้อหาหลัก

วิธีจัดรูปแบบวันที่ตามเงื่อนไขน้อยกว่า / มากกว่าวันนี้ใน Excel

คุณสามารถจัดรูปแบบวันที่ตามเงื่อนไขตามวันที่ปัจจุบันใน Excel ตัวอย่างเช่นคุณสามารถจัดรูปแบบวันที่ก่อนวันนี้หรือจัดรูปแบบวันที่มากกว่าวันนี้ ในบทช่วยสอนนี้เราจะแสดงวิธีใช้ฟังก์ชัน TODAY ในการจัดรูปแบบตามเงื่อนไขเพื่อเน้นวันที่ครบกำหนดหรือวันที่ในอนาคตใน Excel โดยละเอียด

รูปแบบเงื่อนไขก่อนวันนี้หรือวันที่ในอนาคตใน Excel


รูปแบบเงื่อนไขก่อนวันนี้หรือวันที่ในอนาคตใน Excel

สมมติว่าคุณมีรายการวันที่ตามภาพด้านล่างที่แสดง สำหรับการปล่อยให้วันที่ครบกำหนดและวันที่ในอนาคตค้างโปรดดำเนินการดังนี้

1. เลือกช่วง A2: A15 จากนั้นคลิก การจัดรูปแบบตามเงื่อนไข > จัดการกฎ ภายใต้ หน้าแรก แท็บ ดูภาพหน้าจอ:

2 ใน ตัวจัดการกฎการจัดรูปแบบตามเงื่อนไข ใหคลิกปุ the ม กฎใหม่ ปุ่ม

3 ใน กฎการจัดรูปแบบใหม่ คุณต้อง:

1). เลือก ใช้สูตรเพื่อกำหนดเซลล์ที่จะจัดรูปแบบใน Select a Rule Type มาตรา;

2) สำหรับ การจัดรูปแบบวันที่เก่ากว่าวันนี้โปรดคัดลอกและวางสูตร = $ A2 เข้าไปใน จัดรูปแบบค่าโดยที่สูตรนี้เป็นจริง กล่อง;

สำหรับ การจัดรูปแบบวันที่ในอนาคตโปรดใช้สูตรนี้ = $ A2> วันนี้ ();

3). คลิก รูปแบบ ปุ่ม. ดูภาพหน้าจอ:

4 ใน จัดรูปแบบเซลล์ กล่องโต้ตอบระบุรูปแบบสำหรับวันที่ครบกำหนดหรือวันที่ในอนาคตจากนั้นคลิกไฟล์ OK ปุ่ม

5. จากนั้นจะกลับไปที่ ตัวจัดการกฎการจัดรูปแบบตามเงื่อนไข กล่องโต้ตอบ และกฎการจัดรูปแบบวันที่ครบกำหนดจะถูกสร้างขึ้น หากคุณต้องการใช้กฎตอนนี้โปรดคลิกที่ไฟล์ ใช้ ปุ่ม

6. แต่ถ้าคุณต้องการใช้กฎวันที่ครบกำหนดและกฎวันที่ในอนาคตร่วมกันโปรดสร้างกฎใหม่ด้วยสูตรการจัดรูปแบบวันที่ในอนาคตโดยทำซ้ำขั้นตอนข้างต้นจาก 2 ถึง 4

7. เมื่อมันกลับไปที่ ตัวจัดการกฎการจัดรูปแบบตามเงื่อนไข กล่องโต้ตอบอีกครั้งคุณจะเห็นกฎทั้งสองแสดงอยู่ในกล่องโปรดคลิกที่ OK ปุ่มเพื่อเริ่มการจัดรูปแบบ

จากนั้นคุณจะเห็นวันที่ที่เก่ากว่าวันนี้และวันที่มากกว่าวันนี้ได้รับการจัดรูปแบบเรียบร้อยแล้ว

จัดรูปแบบตามเงื่อนไขได้อย่างง่ายดายทุกๆ n แถวที่เลือก:

Kutools สำหรับ Excel's การแรเงาแถว / คอลัมน์สำรอง ยูทิลิตี้ช่วยให้คุณเพิ่มการจัดรูปแบบตามเงื่อนไขให้กับทุก n แถวในการเลือก Excel ได้อย่างง่ายดาย
ดาวน์โหลดฟีเจอร์เต็มฟรี 30 วันของ Kutools for Excel ตอนนี้!


บทความที่เกี่ยวข้อง:

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
Comments (24)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I want to highlight a cell if:
1. today's date is greater than the date in another cell or blank (=TODAY()>'APM Tracker'P14) AND ALSO;
2. If the date in P15 is greater than P14 same highlight color AND ALSO;
3. If the date in P15 is less than P14 I do not want the highlight
This comment was minimized by the moderator on the site
Hey All,

I want to get only past due dates in the particular column. Instead of highlighting the cells with color i need the dates to be picked in the column

Any solution for this....
This comment was minimized by the moderator on the site
Alright, I read through this thread and did not see this question asked/answered. I have a column of future dates. I would like to add conditional formatting to flag that date exactly 30 days before (1st color "Hey you should get this done its due in 30 day's") and 7 days ( 2nd color "You procrastinated and now you have 7 days to complete this"). Any help here?
This comment was minimized by the moderator on the site
Hi Michael,
I am not sure I understand your question clearly. If you want to hight the date which is 30 days and 7 days from today. Please use the following formulas to create two formula rules with different highlighted colors:
=D9=TODAY()+30
=D9=TODAY()+7

https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/conditional-formatting.png
If this is not what you need, please attach a screenshot of your data here.
This comment was minimized by the moderator on the site
To ignore cells that have blanks try this:

=AND($A2<>"",$A2<TODAY())

This assumes the cell you have selected is A2 (change this to whatever cell you have currently selected)
To copy this to the applicable cells, change the "Applies to" to the cell range you need.
This comment was minimized by the moderator on the site
Hi Andy Campbell,
Thank you for sharing.
This comment was minimized by the moderator on the site
Hi
I am trying to use condition formatting to allow a cell to be highlighted when an item is past due based on different turn around times (TAT). I have a column with a submitted date which is then used with the #of days from the TAT to automatically give the due date. Using the following formula, =IF(OR(E3="",A3=""),"",DATE(YEAR(A3),MONTH(A3),DAY(A3)+E3))
The condition formatting currently used is "cell value < today()" applies to +$G:$G.
What I would like to do is use the stop if rule to stop the condition formatting if the date entered in column "H" is < or = to todays date.
Thanks Michelle
This comment was minimized by the moderator on the site
if i want highlight the due date with the conditional : today less or equal 30 days from due date
This comment was minimized by the moderator on the site
I am trying to create conditional formatting that will highlight rows older than 14 days in yellow and highlight rows older than 21 days in red. My date column starts in A2, I have the following rules applied, but only yellow is highlighting and just the date column, not the entire row. Can you help? Scott

1. =ISBLANK(A2)=TRUE
2. =A2<TODAY()-14
3. =A2<TODAY()-21
This comment was minimized by the moderator on the site
I want to ignore blank cells which doesn't have a date i.e I do not want blank cells to be highlighted when I am comparing dates<Today(). Please help
This comment was minimized by the moderator on the site
Hi Madhu,
The first method in this artice can help you solve the problem. Please have a try.
https://www.extendoffice.com/documents/excel/2499-excel-conditional-formatting-ignore-blank-zero.html
This comment was minimized by the moderator on the site
1 colum has the dates in it i want another colum to change colour when this formula is applied.

any ideas?
This comment was minimized by the moderator on the site
Hi grant,
Supposing you want to change the cell color in column B based on dates in column A, please select the column B cells (such as B2:B21), and apply the conditional formatting function with the above formulas =$A2>Today() or =$A2<Today().
This comment was minimized by the moderator on the site
Hello! can anyone help me?

I have =TODAY() formula in A1 and need 3 more rules to work as per below

rule 1 all dates 8 to 14 days older than today

rule 2 : all dates older 14 to 30 days than today

rule 3: all dates 31 or more days older than today
This comment was minimized by the moderator on the site
it should be something like this:

if(*cell*+8>Today();if(*cell*+14<Today();"8-14 from today";"N/A"))
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations