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

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

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

วันที่จัดรูปแบบตามเงื่อนไขเท่ากับ / มากกว่า / เก่ากว่า TODAY

การจัดรูปแบบตามเงื่อนไขวันที่ที่ผ่านมา

การจัดรูปแบบวันที่ในอนาคตตามเงื่อนไข

การจัดรูปแบบตามเงื่อนไขระหว่างวันที่สองวัน

การจัดรูปแบบตามเงื่อนไขตามวันที่ในคอลัมน์อื่น


วันที่จัดรูปแบบตามเงื่อนไขเท่ากับ / มากกว่า / เก่ากว่า TODAY

ในการจัดรูปแบบวันที่ตามเงื่อนไขคุณต้องสร้างกฎใหม่

1. เลือกเซลล์ที่คุณต้องการเพิ่มการจัดรูปแบบตามเงื่อนไขคลิก หน้าแรก > การจัดรูปแบบตามเงื่อนไข > กฎใหม่.
doc การจัดรูปแบบตามเงื่อนไขวันที่ 1

2 ใน กฎการจัดรูปแบบใหม่ ใหเลือก ใช้สูตรเพื่อกำหนดเซลล์ที่จะจัดรูปแบบ in เลือกประเภทกฎ จากนั้นเลือกหนึ่งสูตรตามที่คุณต้องการพิมพ์ จัดรูปแบบค่าโดยที่สูตรนี้เป็นจริง กล่องข้อความ.

  • เท่ากับวันนี้:=$B2=TODAY()
  • มากกว่าวันนี้: =$B2>TODAY()
  • เก่ากว่าวันนี้: =$B2<TODAY()

doc การจัดรูปแบบตามเงื่อนไขวันที่ 2

3 คลิก รูปแบบ เพื่อไปที่ จัดรูปแบบเซลล์ ให้เลือกรูปแบบหนึ่งที่คุณต้องการเน้นเซลล์ตามที่คุณต้องการ
doc การจัดรูปแบบตามเงื่อนไขวันที่ 3

4 คลิก OK > OK. วันที่ได้รับการจัดรูปแบบแล้ว

หมายเหตุ: วันนี้ 15/8/2018
doc การจัดรูปแบบตามเงื่อนไขวันที่ 4


การจัดรูปแบบตามเงื่อนไขวันที่ที่ผ่านมา

หากคุณต้องการจัดรูปแบบวันที่ที่ผ่านมาตามเงื่อนไขคุณสามารถทำได้ดังนี้ในกล่องโต้ตอบกฎการจัดรูปแบบใหม่

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

  • มากกว่า 30 วันที่ผ่านมา: =TODAY()-$B2>30
  • ตั้งแต่ 30 ถึง 15 วันที่ผ่านมารวมถึง: =AND(TODAY()-$B2>=15, TODAY()-$B2<=30)
  • น้อยกว่า 15 วันที่แล้ว: =AND(TODAY()-$B2>=1, TODAY()-$B2<15)

2 จากนั้นคลิก รูปแบบ เพื่อเลือกรูปแบบหนึ่งในไฟล์ จัดรูปแบบเซลล์ โต้ตอบ

3 คลิก OK > OK เพื่อปิดกล่องโต้ตอบ

หมายเหตุ: วันนี้ 15/8/2018
doc การจัดรูปแบบตามเงื่อนไขวันที่ 5


การจัดรูปแบบวันที่ในอนาคตตามเงื่อนไข

ในการจัดรูปแบบวันที่ในอนาคตตามเงื่อนไขคุณสามารถทำได้ดังนี้:

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

  • จะเกิดขึ้นในอีกไม่เกิน 30 วันนับจากนี้: =$B2-TODAY()>30
  • ใน 30 ถึง 15 วันรวม: =AND($B2-TODAY()>=15, $B2-TODAY()<=30)
  • ในเวลาน้อยกว่า 15 วัน: =AND($B2-TODAY()>=1, $B2-TODAY()<15)

2 จากนั้นคลิก รูปแบบ เพื่อเลือกรูปแบบหนึ่งในไฟล์ จัดรูปแบบเซลล์ โต้ตอบ

3 คลิก OK > OK เพื่อปิดกล่องโต้ตอบ


การจัดรูปแบบตามเงื่อนไขระหว่างวันที่สองวัน

ในการจัดรูปแบบตามเงื่อนไขระหว่างวันที่สองวันให้เลือกเซลล์และใช้สูตรนี้ =AND($B2>=$D$2,$B2<=$E$2) D2 คือวันที่เริ่มต้น E2 คือวันที่สิ้นสุด จากนั้นจัดรูปแบบเซลล์ด้วยรูปแบบที่คุณต้องการ

doc การจัดรูปแบบตามเงื่อนไขวันที่ 6
doc การจัดรูปแบบตามเงื่อนไขวันที่ 7

การจัดรูปแบบตามเงื่อนไขตามวันที่ในคอลัมน์อื่น

หากคุณต้องการจัดรูปแบบเซลล์ตามเงื่อนไขตามวันที่ในคอลัมน์อื่นคุณสามารถทำได้ดังนี้

1. สมมติว่าคุณต้องการเน้นการขายในคอลัมน์ C ในขณะที่วันที่สัมพันธ์ในคอลัมน์ B คือ 16/8/2018 โปรดเลือกช่วงคอลัมน์ C ก่อน

2. เปิดใช้งานกล่องโต้ตอบกฎการจัดรูปแบบใหม่และพิมพ์สูตรนี้ =$B2=DATEVALUE("8/16/2018") เข้าไปใน จัดรูปแบบค่าโดยที่สูตรนี้เป็นจริง กล่องข้อความจากนั้นจัดรูปแบบเซลล์ใน จัดรูปแบบเซลล์ โต้ตอบ

doc การจัดรูปแบบตามเงื่อนไขวันที่ 8
doc การจัดรูปแบบตามเงื่อนไขวันที่ 9

หมายเหตุ ในสูตรข้างต้น B2 คือเซลล์วันที่แรกของช่วงวันที่ที่คุณเลือก


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

🤖 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 (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How can I automatically add a date when a cell contains certain text? So, for example, if cell A1 contains "to do", a date is automatically added in another cell. This date is based on a date also from a cell and I would like to add a date + 65 days in the future. Is this possible?
This comment was minimized by the moderator on the site
Cześć, mierzę się z problemem warunkowego podświetlania daty, np.: w kolumnie A mam datę startu danej czynności np. 01.01.2023, w kolumnie B mam datę końca danej czynności np. 07.01.2023 i chodziłoby mi o to, żeby wyróżnić warunkowo np. kolorem zielonym datę w kolumnie B jeżeli pomiędzy datą startu, a datą końca czynności upłynęło mniej niż 7 dni, jeżeli 7 dni i więcej kolorem czerwonym.
This comment was minimized by the moderator on the site
Use two formulas in the conditional formatting dialog:
difference between start date and end date is greater than or equal to 7 days: =B2-A2>=7 format to red
difference between start date and end date is smaller than 7 days: =B2-A2<7 format to green
see screenshot:
https://cdn.extendoffice.com/images/stories/comments/sun-comment/doc-difference-greater-than-7.png
This comment was minimized by the moderator on the site
Cześć, mierzę się z problemem warunkowego podświetlania daty, np.: w kolumnie A mam datę startu danej czynności np. 01.01.2023, w kolumnie B mam datę końca danej czynności np. 07.01.2023 i chodziłoby mi o to, żeby wyróżnić warunkowo np. kolorem zielonym datę w kolumnie B jeżeli pomiędzy datą startu, a datą końca czynności upłynęło mniej niż 7 dni, jeżeli 7 dni i więcej kolorem czerwonym.
This comment was minimized by the moderator on the site
Cześć, mierzę się z problemem warunkowego podświetlania daty, np.: w kolumnie A mam datę startu danej czynności np. 01.01.2023, w kolumnie B mam datę końca danej czynności np. 07.01.2023 i chodziłoby mi o to, żeby wyróżnić warunkowo np. kolorem zielonym datę w kolumnie B jeżeli pomiędzy datą startu, a datą końca czynności upłynęło mniej niż 7 dni, jeżeli 7 dni i więcej kolorem czerwonym.
This comment was minimized by the moderator on the site
Ciao, come posso utilizzare il conditional formatting per evidenziare il mese corrente e il mese successivo?
This comment was minimized by the moderator on the site
Hi, Michela,
highlight the date in current month, please use formula =TEXT(TODAY(),"m")-TEXT(A1,"m")=0 in conditional formatting new rule dialog, and select a color such as yellow to outstanding the dates.
highlight the date in next month, use formula =TEXT(A1,"m")-TEXT(TODAY(),"m")=1 in conditional formatting new rule dialog, and select a color such as green to outstanding the dates.
see screenshot:
https://cdn.extendoffice.com/images/stories/comments/sun-comment/doc-highlight-current-month.png
This comment was minimized by the moderator on the site
Hello there! I have been searching everywhere for an answer to my problem. I really hope that you can help. I have a column of dates that have taken place in the past. It was when a medical fit test was performed. Those need to be done every two years. What I would like to do is have the dates highlight the box Yellow when they are within being 30 days due, and then Red as soon as they are past due. (So if the date in the box is 1/1/2021, it would turn yellow on 12/1/22. It would then turn red on 1/2/23) These dates are a column in a database so I can't just put a date in a cell to be the reference in the formula. I can only use the cell with the date itself. My brain has melted trying to figure this out, please help. I've gone in Excel formula circles and keep coming up with nothing.

I also have a second column that I need to do the same thing with where it happens on a yearly basis.

Any help will be appreciated. Thank you
This comment was minimized by the moderator on the site
Hi, Kris, create two rules in the conditional formatting dialog:
=AND(0<DATE(YEAR($A1)+2,MONTH($A1),DAY($A1))-TODAY(),DATE(YEAR($A1)+2,MONTH($A1),DAY($A1))-TODAY()<=30) using this formula and choose yellow filled color to mark the within 30 days due
=(DATE(YEAR(A1)+2,MONTH(A1),DAY(A1))<TODAY()) using this formula and choose red filled color to mark the past due
This comment was minimized by the moderator on the site
Hola!

como puedo hacer una formula para que si columna D es igual a la comuna E sea verdadero, pero si columna A + 90 dias es igual al columna E siga siendo verdadero de lo contrario sea falso, gracias.
This comment was minimized by the moderator on the site
Hi, try this formula:=IFERROR(IFS(E2=D2,"TRUE",E2=A2+90,"TRUE"),"""FALSE")
Notice that if you are not in other lagnuage version, maybe you need to transform the formula to your local language.
This comment was minimized by the moderator on the site
ERP PO No. Region Update-1 Supplier PIC Note To Receiver PO Age
1091BPA6438143-121 Bali - Lombok Not Yet Implement PS2MS XL 31
1091BPA6438143-123 Bali - Lombok Not Yet Implement Lumpsum 31
1091BPA6438143-124 Bali - Lombok Not Yet Implement Service Package 31
1091BPA6438143-125 Bali - Lombok Not Yet Implement Battery Maintenance 31
1091BPA6438143-127 Bali - Lombok Not Yet Implement MS Dismantle Board 22

kalau cara conditional formating untuk PO aging Lebih dari 70 gimana ya, tapi di file pivot, karena database saya untuk po aging 70 itu pake rumus =IFERROR(DATEDIF(NOW();B56;"d");""&DATEDIF(B56;NOW();"d")) jadi saat saya conditional formating aging lebih dari 70 dengan warna merah itu tidak ke detack di pivotnya,
mohon bantuannya😁
This comment was minimized by the moderator on the site
Bonjour,
je cherche dans GOOGLE SHEET à faire une mise en forme conditionnelle par rapport à une date; je cherche à faire en sorte que quand la date inscrite dans une case dépasse 15jrs alors elle devienne rouge. (01/08/22 dans la case, quand nous sommes le 16/08/22 je voudrais que la case devienne rouge)

merci d'avance.
This comment was minimized by the moderator on the site
Hi, vex, sorry that I only can reply with English since I do not know French. Supposing you want to format all dates that over 15 days based on a date 7/21/2022, you may firstly, change the date 7/21/2022 to a number, 44763, then select the dates that you want to highlight, click Format > Conditional Formatting, and choose Custom formula is in the Format Rules section, type B2>44763+15, and choose red color. See the screenshot:
https://www.extendoffice.com/images/stories/comments/sun-comment/doc_google_sheet_conditional_formatting.png
Hope can help you.
This comment was minimized by the moderator on the site
Bonjour, j'ai téléchargé un document excel pour la gestion des congés: Shift staff. Je voudrais que certaines dates soient conditionnées pour rester inactives chaque année (il s'agit des congés légaux comme le 1er janvier ou le 15 aout) - actuellement je ne peux conditonner que les jours de la semaine, pas les dates - pouvez-vous m'aider?

Merci beaucoup

Pascale
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