Excel macro to highlight cells based on range of dates

Rafe

Contributor
Messages
96
Hello everyone,

Here's my problem: I am trying to create a visual schedule for a company that needs to send out multiple contractors to do different tasks at several job sites. (For the sake of this example, I will call it a "Chore Schedule")

Here is Sheet2 in my excel file: (chore1.jpg)


This image shows the list of chores on the left, the job sites on the top, and the content of the cells are a range of dates.

Here is Sheet1: (chore2.jpg)


This is the VISUAL SCHEDULE. This sheet takes the date-ranges from sheet2 and highlights the cells on sheet1 that correspond with the "Chore at Place" row and the 'Date' columns.

The problem is that I have no idea how to create a macro that will:
1) Read text on sheet2 (2B = "9/16 - 9/18") as a date range.
2) Access sheet1
2) Highlight cells: 2B, 2C & 2D based on the fact that Cells [1B, 1C & 1D] are within the desired date range. (from #1)

I don't know how to make the macro to compare 2 different cell values (as dates) and highlight the column based on the result. The only thing I do know is how to access the correct ROW so that I am getting to the correct "Chore at Place".

I feel that the problem is simple, and perhaps the solution is also simple, I just don't know how to accomplish what I need.

Please offer any suggestions or ask for further clarification.

thank you!
 

Attachments

  • chore1.jpg
    chore1.jpg
    26.5 KB · Views: 0
  • chore2.jpg
    chore2.jpg
    34.1 KB · Views: 0
Back
Top Bottom