Solved

Conditional Formatting based on the Color or Font of Another Cell

Posted on 2016-08-26
8
88 Views
Last Modified: 2016-08-26
I want to change the font of one cell based on the color or font of another cell.  Example:  Cell A1 is given a red fill.  This would trigger the change of the color of the font in Cell B2 from black to red.  

Is this possible in native Excel 2010, or do I need some VBA programming?
0
Comment
Question by:sxlowry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 19

Assisted Solution

by:Roy_Cox
Roy_Cox earned 125 total points
ID: 41771960
I think you will need VBA.

Changing a color of a Font won't trigger any worksheet event to run the macro though so how would you want to run the code?

Explain a little more why you need this, there may be a work around
0
 
LVL 3

Assisted Solution

by:AL_XResearch
AL_XResearch earned 250 total points
ID: 41772057
Can I suggest a different approach ?

Rather than using VBA to check the colour of the trigger cell in order to determine the colour of the target cell (which as Roy_Cox correctly says will require VBA) how about setting your target cell conditional formatting (CF) based on the conditions that originally determine the colour and or font of the trigger cell ?

Sometimes you just need to step back from what you are trying to do.
1
 
LVL 30

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41772063
@AL_XResearch
That seems to be a clever approach and should do the trick. :)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 125 total points
ID: 41772070
@AL_XResearch:
That makes sense, provided that the original referenced cell (A1 in sxlowry's example) is also highlighted based on Conditional Formatting.  If it is manually highlighted, then VBA would be needed.
0
 

Author Comment

by:sxlowry
ID: 41772396
My worksheet is used to record test results.  If the technician determines the result entered in the cell is out of specification, they select the cell and press a macro button which changes the fill to red and the font to italic.  If certain cells are marked "out of spec", I want to trigger a change in the font color of a cell containing a prepopulated string of text so the message becomes visible.
0
 
LVL 3

Accepted Solution

by:
AL_XResearch earned 250 total points
ID: 41772399
Then all you need is to extend the logic / code for your 'out of sync' test.
1
 
LVL 3

Expert Comment

by:AL_XResearch
ID: 41772403
Sorry I meant 'out of spec' not 'out of sync' :)
0
 

Author Closing Comment

by:sxlowry
ID: 41772415
Thanks for everyone's input.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

733 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