Formula or VBA code to format certain cells based on the value.

Seeker2025

New Member
Joined
Feb 2, 2025
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Good day to everyone!

I am looking for a formula that will apply conditional formatting to a certain based on the value in that cell.

I want to create a job pickup time tracker for three shifts in each sheet each day, each with different operators, and upon the duration of the job and the region number of cells to be highlighted.

Example1

Operator-1 picks a 1-hour duration job, and the job is from the UK region

The value I enter is 1-UK1234 were

1 is the 1-hour duration of the job
UK - Is the UK region code
1234 - Is the Job ID which is not standard

Then four cells to be highlighted considering each cell a 15-minute duration.

I have also attached the template and given sample data in this and manually highlighted the cells

But I would like to have a VBA code to highlight as many cells depend on the duration and region.

Pls, refer to my attached screenshot. I wanted to attach the excel workbook, but I think only screenshot I can attach.

I want green color for the UK region jobs, Blue for the US region jobs, Orange for the AP region jobs, Yellow for Break, and Red for Leave.

Cheers.
 

Attachments

  • Screen.png
    Screen.png
    140.3 KB · Views: 20

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
The provided image is very difficult to read. Please post a sample workbook to a download site, then provide the download link here. Thank you.
 
Upvote 0
Hi, thanks for your reply. As I am new to this forum, could you please guide me on where to find the download site.
 
Upvote 0
This forum doesn't provide that service. You'll need to use an outside website (DropBox.com, etc) then provide the download link here.
 
Upvote 0
The link says "You need access".
Google's instructions for sharing a file publicly:

1738562976808.png
 
Upvote 0
I don't see the example workbook you are using for this project.
 
Upvote 0

Forum statistics

Threads
1,226,439
Messages
6,191,045
Members
453,637
Latest member
nathanw90

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