Is there a way I can have cells (starting cell, inbetween cells and finishing cell) automatically change color based on a time input

Paul365

New Member
Joined
Oct 29, 2021
Messages
21
Office Version
  1. 2016
Platform
  1. Windows
  2. Mobile
Hello,

I was wondering if it is possible I could have cells which have time attached in one row (every 15 minutes) ex. A8=7:00am A9= 7:15am, A10 = 7:30am etc. until 11:45pm automatically change color when a start time is inserted and finishing time in a different cell.

Example:
B1:F1 are labeled venues
Cells B2:F7 is the cells which i want the start time and finish time to be entered
Cells A8:A75 is the time designated as reference

If I enter a start time in B2 (lets say 8am) and Finish Time in B3 (lets say 9am) I would like cell B12:15 automatically highlight a certain color.

Is this a possible formula or VBA which can be made?

Please see screen shots to help with example

Any help would be appreciated

Thanks

Paul
 

Attachments

  • Excel Planner screenshot.PNG
    Excel Planner screenshot.PNG
    40.9 KB · Views: 9

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I got this as one rule and one color - but you can break up the conditional formatting rules to use different colors
MrExcelPlayground13.xlsx
JKL
1VenueRoom1Room2
2Start18:007:00
3Finish110:008:00
4Start29:00
5Finish210:30
6Start3
7Finish3
87:00
97:15
107:30
117:45
128:00
138:15
148:30
158:45
169:00
179:15
189:30
199:45
2010:00
2110:15
2210:30
Sheet12
Cells with Conditional Formatting
CellConditionCell FormatStop If True
K8:L22Expression=OR(AND($J8>=K$2,$J8<K$3),AND($J8>=K$4,$J8<K$5),AND($J8>=K$6,$J8<K$7))textNO
 
Upvote 0
Solution
This is amazing, thanks so much.

I have tried it for the morning time and works great, however as soon as I put any times in after 12:00 pm, it always adds an extra colored cell at the end or if started before, it subtracts a colored cell- is there a way to stop this?

It should start and finish where I placed the yellow highlighter.

Prior to 12:00 pm it works amazing.

Thanks so much for your help and assistance
 

Attachments

  • Excel Planner screenshot2.PNG
    Excel Planner screenshot2.PNG
    11.8 KB · Views: 4
Upvote 0
Could it be how you are writing the time? It often defaults to AM if you just put in 12:00 or 2:00. The thing works fine for me when I use 13:30 to 14:30. for noon - I often put in ".5"
 
Upvote 0
Hey, sorry been a while - got caught up.

it works until you add more than one timing in, especially when it is after 3pm now. It seems to loose a cell.
See screen shot
 

Attachments

  • Capture.PNG
    Capture.PNG
    13.9 KB · Views: 2
Upvote 0
Amazing - It works, I had to re make the sheet to get it to work, but thanks so much.

I do have another question now - Is there a way I can make it count multiple times

Thanks

Example:
Capture2.JPG
 
Upvote 0
Amazing - It works, I had to re make the sheet to get it to work, but thanks so much.
The marked solution post has been switched accordingly.


@Paul365: In your future questions, please mark the post as the solution that answered your question instead of your feedback post, so it will help future readers. There is no further action required in this thread.

Also - if you have "another question" even related to a question that was solved already, and if it is a separate question that is not an adjustment on the provided answer then please start another thread, and then you can refer to the related thread by providing its link in your new question.
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

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