Link to home
Start Free TrialLog in
Avatar of yws812
yws812

asked on

EXCEL VBA: color index from conditional formatting

I have a set of cells

5   3   8   2  -6   4   3  -2

I have set a condition formatting to set any negative values to green (colorindex of 4) so the cells in brackets would show up green

5   3   8   2  [-6]   4   3  [-2]

however, when i try to get the cells(r,c).interior.colorindex, it still gives me clear althought the conditional formatting shows it as green.

myColor = cells(r,c).interior.colorindex      (myColor becomes value -4142 which is clear)

How do i get the value of the conditional formatting color and not just the cell color of that cell.
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yws812,
Thanks for the grade!
Brad