koala
10-06-2004, 10:40 PM
Hi everyone,
I am quite new at useing VBA and dont know how to do this.
Is anyone able to assist with some code to automate the process of colouring the interior of cells depending on the time entered.
I have attached a small sample so you can get a better understanding as it is difficult to explain.
Basically here is what is required.
The time matrix is on the sheet from columns J:BF (in half hour increments)
The time entered to start (column E), until the scheduled completion (column F) needs to be coloured blue on the matrix.
The time from scheduled completion (column F) until max hours (column G) needs to be coloured yellow on the matrix.
The time entered as end of shift (column H) needs to be highlighted as red with a "u" (diamond shape in wingdings).
Some times the tasks wrap around days (ie goes past midnight into the next day) and this may cause extra difficulty in the code, so if need be I can try to alter the matrix somehow to save on this extra coding. (not sure how I would be able to achieve this and still have it in the same format though).
There are also some blank cells in the columns (E,F,G,H). ie. between different days etc.
The code would need to fire everytime a time was changed in the columns, which in turn would mean it would first have to clear all the matrix to clear out the old colours.
Hoping someone is able to assist
Thanks in advance
Koala
I am quite new at useing VBA and dont know how to do this.
Is anyone able to assist with some code to automate the process of colouring the interior of cells depending on the time entered.
I have attached a small sample so you can get a better understanding as it is difficult to explain.
Basically here is what is required.
The time matrix is on the sheet from columns J:BF (in half hour increments)
The time entered to start (column E), until the scheduled completion (column F) needs to be coloured blue on the matrix.
The time from scheduled completion (column F) until max hours (column G) needs to be coloured yellow on the matrix.
The time entered as end of shift (column H) needs to be highlighted as red with a "u" (diamond shape in wingdings).
Some times the tasks wrap around days (ie goes past midnight into the next day) and this may cause extra difficulty in the code, so if need be I can try to alter the matrix somehow to save on this extra coding. (not sure how I would be able to achieve this and still have it in the same format though).
There are also some blank cells in the columns (E,F,G,H). ie. between different days etc.
The code would need to fire everytime a time was changed in the columns, which in turn would mean it would first have to clear all the matrix to clear out the old colours.
Hoping someone is able to assist
Thanks in advance
Koala