Solved

EXCEL VBA: color index from conditional formatting

Posted on 2004-04-08
2
417 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 80

Accepted Solution

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

Cheers!

Brad
0
 
LVL 80

Expert Comment

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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you ever had the experience that you had to follow 10 steps over and over again every time when you need to nicely forward an important email to your manager? Fear no more! With the help of the Quick Steps feature in Outlook 2010, your old chor…
Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now