I am new to using VBA and I'm hoping someone may help.
This seems to be simple but.....
I have a worksheet in Excel 2010 that has all the days of the year (ex. 1/1/13) down column A and the corresponding days of the week (ex. Monday) down column B.
What I need is if the days of the week are Saturday and Sunday (in this example cells B5 & B6) then I need the cells directly to the left (in this case cells A5 & B5) have a background color of gray AND the 7 cells directly to the right (in this case cells C5 thru I5 and C6 thru I6) to have a background color of gray.
It seems pretty straight forward but I just can't figure it out.
I have attached a simple file of what it should look like.
If anyone can help, I would be greatly appreciative.
Thank you GarysStudent for the file (very appreciative!!) but when I opened the file all the cells have a white background. All the dates and days are listed, but all have white backgrounds. Am I doing something wrong??
GaryStudent - one last question, if you will. I noticed that your script works on the current worksheet. How can I get that script to work on multiple worksheets within the excel file?? Thank you again