Hello all,
I need some help manipulating some ranges in excel. I have a spreadsheet that I am creating from an Access form that needs some color-coding- the code I am using is as follows:
By using the UsedRange property though, obviously I am searching through all of the columns on the spreadsheet (12). In actuality the only ones that need to be searched and color-coded are columns D, G, H, and I. Though the process I've got right now works, I think I am slowing the process way down by making it search the entire used range. How can I re-write this so it only searches the four columns of interest.
Thanks in advance for the help.
CM
I need some help manipulating some ranges in excel. I have a spreadsheet that I am creating from an Access form that needs some color-coding- the code I am using is as follows:
Code:
For Each c In DataSht.UsedRange
If c.Text = "Manual" Then c.Interior.Color = RGB(255, 255, 0)
If c.Text = "Open" Then c.Interior.Color = RGB(217, 207, 251)
Next c
By using the UsedRange property though, obviously I am searching through all of the columns on the spreadsheet (12). In actuality the only ones that need to be searched and color-coded are columns D, G, H, and I. Though the process I've got right now works, I think I am slowing the process way down by making it search the entire used range. How can I re-write this so it only searches the four columns of interest.
Thanks in advance for the help.
CM