gcapp
01-17-2013, 06:18 AM
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.
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.