get the active color of a cell

I got cells that had there color chaging automatically using a format
condition (cond#1:red if B4<10 cond#2:green if C5>100 for example...).
Now, I would like to automatically change the color to blue if the
active color is red (condition #1 true in my example). 
I can get the ColorIndex of the cell:
-when no condition applied = .Font.ColorIndex
-when condition #1 applied = .FormatConditions(1).Font.ColorIndex
-when condition #2 applied = .FormatConditions(2).Font.ColorIndex
But impossible to retrieve the actual cell color... any idea?
Another way to solve my problem would be to be able to know if each
condition is true or false. But I need light on that too!!
Thx in advance,
Chib.
ps: I have a feeling this is not a easy one, but any help will be very
appreciated.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

0
9/18/2003 2:48:14 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
340 Views

Similar Articles

[PageSpeed] 26

Chib,

Again not exactly sure I understand, but getting the colour is subjective.
What you may call some shade of green, I cal some shade of blue. And you
cannot rely on the colours in the colour palette, as they can be replaced.
For instance, colorindex 50 is Sea Green in the default palette, but you can
change that to red!

Tricky I think.

--

HTH

Bob Phillips

"chibouki" <chibouki.tyi9a@excelforum.com> wrote in message
news:chibouki.tyi9a@excelforum.com...
> I got cells that had there color chaging automatically using a format
> condition (cond#1:red if B4<10 cond#2:green if C5>100 for example...).
> Now, I would like to automatically change the color to blue if the
> active color is red (condition #1 true in my example).
> I can get the ColorIndex of the cell:
> -when no condition applied = .Font.ColorIndex
> -when condition #1 applied = .FormatConditions(1).Font.ColorIndex
> -when condition #2 applied = .FormatConditions(2).Font.ColorIndex
> But impossible to retrieve the actual cell color... any idea?
> Another way to solve my problem would be to be able to know if each
> condition is true or false. But I need light on that too!!
> Thx in advance,
> Chib.
> ps: I have a feeling this is not a easy one, but any help will be very
> appreciated.
>
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~ View and post usenet messages directly from http://www.ExcelForum.com/
>


0
bob.phillips (411)
9/18/2003 3:19:16 PM
Reply:

Similar Artilces:

Exchange Active Sync #4
I have a user with a Sprint PalmOne Treo 650. Sprint advertises that this is supported by Exchange 2003 Server Active Sync. Microsoft has documented that Active Sync is included with Exchange 2003 at no additional cost. I have not been able to find documentation on how to install and configure Exchange 2003 Active Sync to support a Sprint PalmOne Treo 650. Can anyone point me to Microsoft or Sprint/PalmOne documentation on how to setup Exchange 2003 Active Sync to support a Treo 650? I work with the American Red Cross, a non-profit organization. I appreciate your help and support. On ...

Excel, how do I get ALT F C to work the same as ALT F Enter C ?
The above is an example, but it aplies to any menu. Before, if I pressed say, ALT F, the drop down menu would appear and I could press, say, C and get to the submenu. Now I have to press Enter, before the C, which is a bother. Thanks. On my Windows 2000 version 5.00.2195 with Excel '97 and Excel 2003 the Alt F C still works. What version software / Excel are you using? -- Bryan Hessey ------------------------------------------------------------------------ Bryan Hessey's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=21059 View this thread: http://www....

Trying to Get Subset of XML
I want to display a segment of an XML (see below) file in a datagrid. I want to select a specific <EventID> and get all of its children into a dataset so that I can bind a datagrid to those values. I am trying an expression as follows but I get an error "Value of type 'System.Xml.XmlNode' cannot be converted to 'System.Xml.XmlNodeList'." myNodes = xmldoc.ChildNodes("/Dataset/Events/[ShowName=Round 2]") What is the correct way to "get" that set of nodes and convert them to a dataset? ================== Portion of XML File ===============...

Wrapping text in a cell
In a single cell, suppose I want text to appear on two lines. Viz: Case One Case Two How do I do that so that I specify the wrap point? Thanks! If you are typing the data into the cell use Alt-Enter between each string to indicate where you want a line break to occur. Case One<Alt-Enter>Case Two Alt + Enter -- Lilliabeth ------------------------------------------------------------------------ Lilliabeth's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27741 View this thread: http://www.excelforum.com/showthread.php?threadid=476428 If you...

pantone colors #2
Is there a way to make Publisher 2007 show all Pantone Colors? I want 021 U. Find doesn't do it. B I don't think Publisher has all the Pantone colors. There are close equivalents. Not the same of course... C=0 M=53 Y=100 K=0 R=252 G=115 B=35 -- Mary Sauer http://msauer.mvps.org/ "Bob Wright" <mmpdallas@sbcglobal.net> wrote in message news:%23N1wilmHJHA.1364@TK2MSFTNGP04.phx.gbl... > Is there a way to make Publisher 2007 show all Pantone Colors? I want 021 U. > Find doesn't do it. > B Guess you are right, not all there. Weird. Close equivalents ...

Locking Formulas to Cells
I don't know if I am using the correct terminology but this is what want to do: I have placed formulas in multiple columns that calculat my sales numbers for a bid. The problem I am running into is that change the bids for every person and when I clear a cell is clears th formula from it as well. Is there a way for me to clear cells withou deleting the formula I have placed inside it? I know that I can jus grab the first cell in the column and drag it down to re-load th formula in that column but I don't want to have to do that. I want th formulas permenant and the data I enter...

How do I add a hyperlink to an individual word in an Excel cell?
I am using Excel 2000 (not by choice) and I need to add a hyperlink to an individual word within the cell, not the whole cell itself. For example in the sentence "Click here or here to go to the appropriate web page." I want the words "here" to each have a separate hyperlink. Any ideas? I can manage some VBA too if necessary. Thanks, Rosalie Hi Rosalie, You can't do that in Excel. You would have to use HTML or Word or some other means. You could fake it, the entire cell would be a link, but you could after assigning the hyperlink select another...

how can I drag formulas with other cell references
example cell A1 contains formula "=stdev(a2:a7) cell a2 contains formula "=stdev(a8:a13) Is it possible to drag the formula down so that cell a3 contains "=stdev(a14:19) and cell a4 contains "=stdev(a20:a25) and so on for cells a5, a6, a7 etc. etc. Hi Bram, See http://www.mvps.org/dmcritchie/excel/snakecol.htm#snkAddr B1: =stdev(OFFSET($A$1,6*ROW()-5,0):OFFSET($A$1,6*ROW(),0)) B2: =stdev(OFFSET($A$1,6*ROW()-5,0):OFFSET($A$1,6*ROW(),0)) It was easier to test and verify using SUM instead of stdev, but the formula is same NOTE the formulas are in a different colu...

Cell Selection?
I have a colum of numbers 198 0 0 198 2 What I need, is to be able to select 3. the 198's are not going to be used in the next part of my equation. That seems simple enough, however all the numbers could be usable (not 198) and I need to use just the first three. Any ideas? One interp / way, using non-array formulas Assuming source numbers in A1 down Put In B1: =IF(COUNT($C$1:C1)>3,"",C1) In C1: =IF(ISERROR(SMALL(D:D,ROW(A1))),"", INDEX(A:A,MATCH(SMALL(D:D,ROW(A1)),D:D,0))) In D1: =IF(A1="","",IF(A1=198,"",ROW())) Select B1:D...

Formulas don't work in certain cells #2
nope, the cells are formatted as numbers. I simply cannot figure thi out. -Jorda -- kalik24 ----------------------------------------------------------------------- kalik247's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1594 View this thread: http://www.excelforum.com/showthread.php?threadid=27423 Being formatted as numbers doesn't automatically mean they are numbers. Copy an empty cell formatted to General. Select your range of numbers and Paste Special>Add>OK>Esc Gord Dibben Excel MVP On Mon, 1 Nov 2004 11:59:46 -0600, kalik247 <kalik2...

How do I get excel files to open automatically from directories?
When I try to open excel files from the directory or from desktop I only get a blank worksheet not the file. I have to then go through File Open to get the file I want. There must be a way to have them open automatically. On Mon, 2 Jan 2006 21:22:01 -0800, Damian <Damian@discussions.microsoft.com> wrote: >When I try to open excel files from the directory or from desktop I only get >a blank worksheet not the file. I have to then go through File Open to get >the file I want. > >There must be a way to have them open automatically. Go to Tools -> Options -> Gen...

I can't get rid of 1 "Payment to Send' Reminder-M07
On my Home Page in the Reminder section, I have a "1 Payment to Send" listed there. But there is NO payment to send. I"ve opened up back-up copies as far back as May and the reminder is there, but there is no payment that needs sending. Does anybody have an idea how I can get rid of this Reminder? Just removing the Reminder from Home Page doesn't do it. When you put the Reminder back on the Home Page, the "Payment to Send" is still there. Clicking on the link just takes me to Bill Summary page. ...

getting added to other peoples meetings in shared calendar
I opened shared calendars in my group by choosing their name and then the email messages went out giving them access to my calendar and requesting to view theirs. Ever since, I have been copied in as a "required attendee" on all meetings for everyone. I get the calendar items on my calendar and emails requesting Accept or Decline in my inbox. When others view view thru their outlook, they do not see me as a required attendee? What am I doing wrong? are you adding them as delegates or just giving them permission to view the calendar (by right clicking on the calendar fold...

if cell in other worksheet meets criteria, then leave blank.
I have data in worksheet A for each month, for each entity. Then I have a summary page which shows just the averages for each entity for each month. Then I need to create a master summary page which shows just the annual average for each entity, just one line per entity. My Summary page shows Jan-Dec in column A. I have a formula averaging the numbers from worksheet A. Jan-Mar is done. But the rest of the year hasn't happened yet, so April's formula results "#DIV/0!". I have already put in all the formulas for the year to be done with it. But I don'...

Cannot get my CImageList to display images?
Ok i am successfully diplaying images in my tree controls but not my list controls. I am using the following but not image is being displayed??? int nIndex = mListCtrl.InsertItem(LVIF_IMAGE | LVIF_TEXT,0,"hello", 0,0,7,0L); Where 7 is a valid index into my image list! Please help? That really doesn't help much. Since you got the tree control working I'm assuming that you are calling the list control's SetImageIist. Also for debugging purposes call GetImageCount on your image list to see how many images it loaded. Let me also point out that you can call this ...

Can Work thread get a windows class and manipulate it?
Suppose that I create a work thread when my dialog box started, then in the thread I get the pointer to the dialog mfc class and call updateData method. Does that work? I tried, but failed. Is there any other way to do? thanks!! No, it won't work, don't even waste time trying. It is almost guaranteed to fail. You do not manipulate the windows owned by one thread from a different thread. What you do is PostMessage requests from the worker thread to the main UI thread, usually to the window that contains the controls. The fact that you are using UpdateData already says you are in t...

Don't get some emails;
Some emails don't come thru. From another computer I can forward messages to my email site but don't receive new messages. Also not getting some emails from various sites. ...

Putting Excel Charts into a Word document that's getting too big
I am creating a Word document (our Annual Report) in which I will have many charts and graphs that were created in Excel. Currently, there will be at least 26 graphs/charts in the document. In the past, there have apparently been problems with not having enough space to save the Word document because it gets too big. The document itself is only about 36 pages, but, as I mentioned, within the 36 pages are at least 26 graphs and charts. I'm looking for a way to copy the graphs/charts into Excel without it taking so much memory. One solution we thought of was to only paste the gra...

Fill cells with interpolated values
Hi What is the easiest way to fill cells with linear interpolated values ? e.g. i have value 5 in cell A1, and value 15 in cell A6. Cells A2 ... A5 should now be filles with 7, 9, 11, 13. of course, it's not a big deal to write a formula for interpolation, but maybe there is more simple way, (just by some mouse clicks....?) Biff Select the range A1:A6 with your start and stop value in their respective cells, and then do Edit / Fill / Series / Trend / Linear -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/...

Changing of range (Address) to (Cell)
Hi people I have encounter a problem with the use of range From a recorded macro, it's listed this way ActiveChart.SetSourceData Source:=Sheets("Trend").Range("A1:M2,A24:M28"), PlotBy:=xlRow And I edit it to this way ActiveChart.SetSourceData Source:=Sheets("Trend").Range("A1:M2," & Cells(StartX, StartY), Cells(LastX, LastY)), PlotBy:=xlRow And obviously VBA compiler won't let me go this easily, it happen to give an "evil-comment" on my source range, May i know how can i solve this Thank You Hi Kaiyang, Try this, assuming the...

Out of Office not active Entourage 2008 exchange 2007
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: Exchange Hi, <br><br>I have Entourage 2008 with latest service pack. Exchaneg 2007 sp2. MAC OS X 10.6. Out of Office works for Outlook and OWA. When I open up Entourage on any MAC and go to Tools, the Out Of Office is dimmed/ not active? Any idea? <br><br>Thanks, <br><br>Mike ...

Working with a worksheet that is not the active worksheet
How can I make this code work on my worksheet named February, when it is not the active worksheet? Sub BlankWeeks() ' ' Macro2 Macro ' ' If Range("C184").Value = "" Then Rows("184:228").Hidden = True End If If Range("C184").Value <> "" Then Rows("184:228").Hidden = False End If If Range("C229").Value = "" Then Rows("229:273").Hidden = True End If If Range("C229").Value <> "" The...

Tool to Create High-Color Icons
Can anyone recommend a good tool for creating high-color icons for my projects. I have Corel Photo-Paint. It's pretty powerful but I can't do very good shading by hand. Aren't there some tools out there that will render 3D shading? Thanks for any suggestions. -- Jonathan Wood SoftCircuits Programming http://www.softcircuits.com I would recommend XaraX (www.xara.com). You can produce nice shaded stuff like on the page: http://www.terra-informatica.org/htmlayout/ You should save (export) you images as PNGs (with or without alpha channel) and use 2DIB.exe (http://www.terra-in...

Extracting the month that a date refers to in another cell
In cell A1 I have the date 3/15/2003 (no formatting). In cell B1 I have the formula =year(A1). The year shows correctly as 2003. In cell C1 I have the formula =text(weekday(A1),"ddd"). The text shows as "Sat" which is correct. In cell D1 I have the formula =month(A1) which correctly shows '3'. I attempted to use =text(month(A1),"mmm") in cell D1, but it shows as "Jan". Can someone tell me what I am doing wrong? TIA, Alan =TEXT(A1,"mmm") for 3-letter month name and =TEXT(A1,"ddd") for 3-letter day name. where A1 houses a...

How to add a drop down menu to a cell
How to add a drop down menu to a cell? hi, you don't add it to a cell. It's a control in the toolbox and it sits on top of the sheet. Tools>customize>toolbar tab>select control toolbox. it's called a combo box. click it and drag it to the sheet. for more help on combo boxes, type combo box in help. >-----Original Message----- >How to add a drop down menu to a cell? >. > You can do it. Take a look at Data>Validation, see this site for full details http://www.contextures.com/xlDataVal01.html -- HTH RP (remove nothere from the email address if mailing d...