Needing help with Macro for highlighting specific rows.

Frapp34

New Member
Joined
Dec 11, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hello, I need help with a macro that would highlight specific rows, one of 3 colors based off the criteria in the E column.

We need to be at places at specific times, 06:00:00 - 09:00:00 09:00:00 - 12:00:00 12:00:00 - 15:00:00.

Was seeing if the whole row could be highlighted based off those times, 6-9 is blue, 9-12 is yellow and 12-3 is green.

Had to remove some sensitive info but if anyone could help that would be great. Thank you!!

1639213771753.png
 

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.
Do you really need a VBA solution ? Simple Conditional Formatting would to the trick
 
Upvote 0
Do you really need a VBA solution ? Simple Conditional Formatting would to the trick
Sorry first time on here and don't know that much about this stuff. I am using Excel 2019.

Heard people at work saying they used macros so i thought thats what i needed, but don't know about simple conditional formatting
 
Upvote 0
You can find many tutorials around
One of them Conditional Formatting in Excel
In your case you will need to apply the CF to your entire table and use a formula like =$E3="09:00-12.00.00" to trigger the formatting for the first and create two other rules for the other colors
(and you definitely do not need VBA for this kind of task, unless other things should happen)
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,731
Members
449,093
Latest member
Mnur

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