Skip i'r prif gynnwys

Sut i fformatio amodol yn seiliedig ar ddyddiad yn Excel?

Awdur: Haul Wedi'i Addasu Diwethaf: 2020-09-14

Fel y gwyddom, gall y Fformatio Amodol newid fformat celloedd yn seiliedig ar gynnwys y gell. Y tiwtorial hwn, byddaf yn cyflwyno sut i fformatio celloedd yn amodol yn seiliedig ar ddyddiad yn Excel.

Dyddiadau fformatio amodol sy'n hafal i / yn fwy na / yn hŷn na HEDDIW

Fformatio amodol dyddiadau'r gorffennol

Fformatio amodol dyddiadau'r dyfodol

Fformatio amodol rhwng dau ddyddiad

Fformatio amodol yn seiliedig ar ddyddiad mewn colofn arall


Dyddiadau fformatio amodol sy'n hafal i / yn fwy na / yn hŷn na HEDDIW

I ddyddiadau fformatio amodol, mae angen i chi greu rheol newydd.

1. Dewiswch y celloedd rydych chi am ychwanegu'r fformatio amodol, cliciwch Hafan > Fformatio Amodol > Rheol Newydd.
dyddiad fformatio amodol doc 1

2. Yn y Rheol Fformatio Newydd deialog, dewiswch Defnyddiwch fformiwla i bennu pa gelloedd i'w fformatio in Dewiswch Math o Reol adran, yna dewiswch un fformiwla yn ôl yr angen i chi deipio i mewn Gwerthoedd fformat lle mae'r fformiwla hon yn wir blwch testun.

  • hafal i heddiw:=$B2=TODAY()
  • reater na heddiw: =$B2>TODAY()
  • Hyn na heddiw: =$B2<TODAY()

dyddiad fformatio amodol doc 2

3. Cliciwch fformat i fynd i'r Celloedd Fformat deialog, dewiswch un fformat rydych chi am dynnu sylw at y celloedd yn ôl yr angen.
dyddiad fformatio amodol doc 3

4. Cliciwch OK > OK. Mae'r dyddiadau wedi'u fformatio.

Nodyn: Heddiw yw 15/8/2018
dyddiad fformatio amodol doc 4


Fformatio amodol dyddiadau'r gorffennol

Os ydych chi am fformatio dyddiadau'r gorffennol yn amodol, gallwch wneud fel a ganlyn yn y dialog Rheol Fformatio Newydd.

1. Dewiswch un o'r fformiwlâu isod yn ôl yr angen, a'i deipio i mewn i'r Gwerthoedd fformat lle mae'r fformiwla hon yn wir blwch testun.

  • Mwy na 30 diwrnod yn ôl: =TODAY()-$B2>30
  • Rhwng 30 a 15 diwrnod yn ôl, yn gynhwysol: =AND(TODAY()-$B2>=15, TODAY()-$B2<=30)
  • Lai na 15 diwrnod yn ôl: =AND(TODAY()-$B2>=1, TODAY()-$B2<15)

2. Yna cliciwch fformat i ddewis un fformat yn y Celloedd Fformat deialog.

3. Cliciwch OK > OK i gau'r dialogau.

Nodyn: Heddiw yw 15/8/2018
dyddiad fformatio amodol doc 5


Fformatio amodol dyddiadau'r dyfodol

I fformatio amodau dyddiadau yn y dyfodol, gallwch wneud fel y rhain:

1. Dewiswch un o'r fformiwlâu isod yn ôl yr angen, a'i deipio i mewn i'r Gwerthoedd fformat lle mae'r fformiwla hon yn wir blwch testun.

  • Bydd yn digwydd mewn mwy na 30 diwrnod o nawr: =$B2-TODAY()>30
  • Mewn 30 i 15 diwrnod, yn gynhwysol: =AND($B2-TODAY()>=15, $B2-TODAY()<=30)
  • Mewn llai na 15 diwrnod: =AND($B2-TODAY()>=1, $B2-TODAY()<15)

2. Yna cliciwch fformat i ddewis un fformat yn y Celloedd Fformat deialog.

3. Cliciwch OK > OK i gau'r dialogau.


Fformatio amodol rhwng dau ddyddiad

I fformatio amodol rhwng dau ddyddiad, dewiswch y celloedd a defnyddiwch y fformiwla hon, =AND($B2>=$D$2,$B2<=$E$2) D2 yw'r dyddiad cychwyn, E2 yw'r dyddiad gorffen. Yna fformatiwch y celloedd gyda fformat sydd ei angen arnoch chi.

dyddiad fformatio amodol doc 6
dyddiad fformatio amodol doc 7

Fformatio amodol yn seiliedig ar ddyddiad mewn colofn arall

Os ydych chi eisiau fformatio celloedd yn amodol yn seiliedig ar y dyddiad mewn colofn arall, gallwch chi wneud fel y rhain.

1. Gan dybio eich bod am dynnu sylw at werthiannau yng ngholofn C tra mai'r dyddiadau cymharol yng ngholofn B yw 16/8/2018, dewiswch ystod colofn C yn gyntaf.

2. Galluogi'r ymgom Rheol Fformatio Newydd a theipio'r fformiwla hon =$B2=DATEVALUE("8/16/2018") i mewn i'r Gwerthoedd fformat lle mae'r fformiwla hon yn wir blwch testun, yna fformatiwch y celloedd i mewn Celloedd Fformat deialog.

dyddiad fformatio amodol doc 8
dyddiad fformatio amodol doc 9

Nodyn: Yn y fformwlâu uchod, B2 yw cell dyddiad cyntaf yr ystod dyddiad a ddewiswyd gennych.


Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
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