G
Guest
Hello All
I have a snippet of code that I've been using to test for the color format of a cell in a particular range and then change the color format of cells in a parallel range based upon the outcome of the test
Unfortunately, when I used this code snippet in a recent script my test isn't working
Here's the snippet and the result I'm getting
For Each c In Worksheets("Factors").Range("RANK"
If c.Interior.ColorIndex = 37 Then Worksheets("Factors").Range("FNUM").Cells(counter).Interior.ColorIndex = 40 'salmo
If c.Interior.ColorIndex = 4 Then Worksheets("Factors").Range("FNUM").Cells(counter).Interior.ColorIndex = 40 'salmo
counter = counter +
Next
I have a watch on the c.Interior.ColorIndex and when it hits the first cell in "RANK" the value becomes -4142 (variant/long). Typically the cell format should be either 37, 4, or no format.
Any ideas where the -4142 is coming from
Thanks!
I have a snippet of code that I've been using to test for the color format of a cell in a particular range and then change the color format of cells in a parallel range based upon the outcome of the test
Unfortunately, when I used this code snippet in a recent script my test isn't working
Here's the snippet and the result I'm getting
For Each c In Worksheets("Factors").Range("RANK"
If c.Interior.ColorIndex = 37 Then Worksheets("Factors").Range("FNUM").Cells(counter).Interior.ColorIndex = 40 'salmo
If c.Interior.ColorIndex = 4 Then Worksheets("Factors").Range("FNUM").Cells(counter).Interior.ColorIndex = 40 'salmo
counter = counter +
Next
I have a watch on the c.Interior.ColorIndex and when it hits the first cell in "RANK" the value becomes -4142 (variant/long). Typically the cell format should be either 37, 4, or no format.
Any ideas where the -4142 is coming from
Thanks!