Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

EXCEL VBA: color index from conditional formatting

Posted on 2004-04-08
2
Medium Priority
?
451 Views
Last Modified: 2011-09-20
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.
0
Comment
Question by:yws812
  • 2
2 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 200 total points
ID: 10785599
Hi yws812,
See Chip Pearson's web page http://www.cpearson.com/excel/CFColors.htm

Cheers!

Brad
0
 
LVL 81

Expert Comment

by:byundt
ID: 10786065
yws812,
Thanks for the grade!
Brad
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question