Solved

Conditional Formatting based on the Color or Font of Another Cell

Posted on 2016-08-26
8
37 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
8 Comments
 
LVL 17

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 28

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41772063
@AL_XResearch
That seems to be a clever approach and should do the trick. :)
0
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Macro Capitalize 4 52
Adding Text that self adjusts in a Cell 8 32
Help with Adding text from a form to a worksheet 5 37
Excel 2016 Not Responding Issues 6 27
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
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…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

919 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

16 Experts available now in Live!

Get 1:1 Help Now