Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-05-2025, 09:00 AM
gmaxey gmaxey is offline VBA code that will apply to certain cells based on their value Windows 10 VBA code that will apply to certain cells based on their value Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default Alternate

Quote:
Originally Posted by Seeker2025 View Post
Good day to everyone!

I am looking for a VBA code that will apply to certain cells based on their value.

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 that many 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.

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.
Are you looking to define, create and color code you task\events individually? Yes?


Download the attached file. Unblock macros from running and open the file.
Dbl_click in in on of the time slot fields for an individual. Fill in the displayed userform or select a range time slot cells for an individual and press CTRL+SHIFT+E (this way your defined duration will auto populate when you select the task code.


BREAK


For any other experienced Excel users - I basically a nub with Excel VBA but got interested in this thread and took a stab at it. The differences between Excel range and Word Range seem legion. I certainly welcome any constructive criticism and any suggestions to improve the code or improve the OP's process.
Attached Files
File Type: xlsm PickupTracker Ver 1.1.xlsm (76.9 KB, 3 views)
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/

Last edited by gmaxey; 02-05-2025 at 02:55 PM.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula or VBA code to format certain cells based on the cell value Seeker2025 Excel 1 02-03-2025 01:14 AM
Apply a formula based on whether a cell is blank or has a date NLJ Excel 4 09-17-2021 06:02 AM
VBA code that will apply to certain cells based on their value VBA Code apply draft lodi123 Word VBA 1 02-21-2017 04:55 AM
Conditional formating all cells in an array based on adjacent cells deejay Excel 6 12-20-2016 12:00 PM
Is it possible to have a style apply two formats based upon text? DMcCollum Word 3 05-02-2015 06:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:10 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft