Conditional Formatting based on date

WallyExcel

New Member
Joined
Sep 3, 2014
Messages
14
Hello!

I'm trying to color cells within a row based on the date displayed within that row.

Column A equals Column B but in day format, so when the date in column B equals a date that I'm placing in a separate cell not shown here, I want that date's row of data to be highlighted a certain color, and I want to do this for what will basically be a full calendar year of data by month, so that I don't need to format the rows myself each day. I hope this makes sense, but please let me know if you need any additional information - thank you!

[TABLE="class: grid, width: 960"]
<tbody>[TR]
[TD="width: 64"]A[/TD]
[TD="width: 64"]B[/TD]
[TD="width: 64"]C[/TD]
[TD="width: 64"]D[/TD]
[TD="width: 64"]E[/TD]
[TD="width: 64"]F[/TD]
[TD="width: 64"]G[/TD]
[TD="width: 64"]H[/TD]
[TD="width: 64"]I[/TD]
[TD="width: 64"]J[/TD]
[TD="width: 64"]K[/TD]
[TD="width: 64"]L[/TD]
[/TR]
[TR]
[TD]Sun[/TD]
[TD="align: right"]16-Oct[/TD]
[TD="align: right"]51[/TD]
[TD="align: right"]$112.97[/TD]
[TD="align: right"]79[/TD]
[TD="align: right"]$147.73[/TD]
[TD="align: right"]37[/TD]
[TD="align: right"]$106.04[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]67.2%[/TD]
[TD="align: right"]84[/TD]
[/TR]
[TR]
[TD]Mon[/TD]
[TD="align: right"]17-Oct[/TD]
[TD="align: right"]112[/TD]
[TD="align: right"]$128.43[/TD]
[TD="align: right"]110[/TD]
[TD="align: right"]$145.31[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]$109.82[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]92.0%[/TD]
[TD="align: right"]115[/TD]
[/TR]
[TR]
[TD]Tue[/TD]
[TD="align: right"]18-Oct[/TD]
[TD="align: right"]112[/TD]
[TD="align: right"]$127.47[/TD]
[TD="align: right"]94[/TD]
[TD="align: right"]$142.32[/TD]
[TD="align: right"]49[/TD]
[TD="align: right"]$144.35[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]95.2%[/TD]
[TD="align: right"]113[/TD]
[/TR]
[TR]
[TD]Wed[/TD]
[TD="align: right"]19-Oct[/TD]
[TD="align: right"]124[/TD]
[TD="align: right"]$133.13[/TD]
[TD="align: right"]79[/TD]
[TD="align: right"]$147.12[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]$155.55[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]47.2%[/TD]
[TD="align: right"]55[/TD]
[/TR]
[TR]
[TD]Thu[/TD]
[TD="align: right"]20-Oct[/TD]
[TD="align: right"]98[/TD]
[TD="align: right"]$134.24[/TD]
[TD="align: right"]112[/TD]
[TD="align: right"]$143.35[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]$144.59[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]72.0%[/TD]
[TD="align: right"]90[/TD]
[/TR]
[TR]
[TD]Fri[/TD]
[TD="align: right"]21-Oct[/TD]
[TD="align: right"]109[/TD]
[TD="align: right"]$138.59[/TD]
[TD="align: right"]118[/TD]
[TD="align: right"]$148.74[/TD]
[TD="align: right"]77[/TD]
[TD="align: right"]$126.96[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]76.0%[/TD]
[TD="align: right"]94[/TD]
[/TR]
[TR]
[TD]Sat[/TD]
[TD="align: right"]22-Oct[/TD]
[TD="align: right"]103[/TD]
[TD="align: right"]$146.68[/TD]
[TD="align: right"]118[/TD]
[TD="align: right"]$157.77[/TD]
[TD="align: right"]79[/TD]
[TD="align: right"]$129.47[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]64.0%[/TD]
[TD="align: right"]81[/TD]
[/TR]
[TR]
[TD]Sun[/TD]
[TD="align: right"]23-Oct[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]$125.03[/TD]
[TD="align: right"]98[/TD]
[TD="align: right"]$147.26[/TD]
[TD="align: right"]39[/TD]
[TD="align: right"]$113.27[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]73.6%[/TD]
[TD="align: right"]93[/TD]
[/TR]
[TR]
[TD]Mon[/TD]
[TD="align: right"]24-Oct[/TD]
[TD="align: right"]104[/TD]
[TD="align: right"]$133.79[/TD]
[TD="align: right"]115[/TD]
[TD="align: right"]$143.89[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]$127.78[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]100.0%[/TD]
[TD="align: right"]124[/TD]
[/TR]
[TR]
[TD]Tue[/TD]
[TD="align: right"]25-Oct[/TD]
[TD="align: right"]121[/TD]
[TD="align: right"]$134.23[/TD]
[TD="align: right"]119[/TD]
[TD="align: right"]$143.95[/TD]
[TD="align: right"]51[/TD]
[TD="align: right"]$136.24[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]88.8%[/TD]
[TD="align: right"]110[/TD]
[/TR]
[TR]
[TD]Wed[/TD]
[TD="align: right"]26-Oct[/TD]
[TD="align: right"]125[/TD]
[TD="align: right"]$130.28[/TD]
[TD="align: right"]99[/TD]
[TD="align: right"]$135.01[/TD]
[TD="align: right"]106[/TD]
[TD="align: right"]$169.62[/TD]
[TD]125[/TD]
[TD]0[/TD]
[TD]88.0%[/TD]
[TD="align: right"]112[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Let's say your compare date is in Z1, and you want columns A:L highlighted if the value in B matches Z1.

1) Select columns A:L
2) Click Conditional Formatting > New Rule > Use a formula
3) Put this in the formula box:
=$B1=$Z$1
4) Click Format and choose a fill color.
5) Click OK.

That should do it.
 
Upvote 0
That worked like a charm - I was looking at this for about 2 hours - thank you so much!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top