Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Compare font colors

How can I write a formula to compare the contents of two cells and do
one thing if the font colors are the same and do a different thing if
the font colors are different?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Compare font colors

On Nov 7, 5:56*pm, gary wrote:
How can I write a formula to compare the contents of two cells and do
one thing if the font colors are the same and do a different thing if
the font colors are different?


How did the fonts become colored, manually, or by conditional
formatting?
Also, which version of excel ________?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Compare font colors

On Nov 7, 4:07*pm, Don Guillett wrote:
On Nov 7, 5:56*pm, gary wrote:

How can I write a formula to compare the contents of two cells and do
one thing if the font colors are the same and do a different thing if
the font colors are different?


How did the fonts become colored, manually, or by conditional
formatting?
Also, which version of excel ________?


Manually.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Compare font colors

On Nov 7, 4:15*pm, gary wrote:
On Nov 7, 4:07*pm, Don Guillett wrote:

On Nov 7, 5:56*pm, gary wrote:


How can I write a formula to compare the contents of two cells and do
one thing if the font colors are the same and do a different thing if
the font colors are different?


How did the fonts become colored, manually, or by conditional
formatting?
Also, which version of excel ________?


Manually.


Microsoft Office Excel 2007.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Compare font colors

On Nov 7, 6:19*pm, gary wrote:
On Nov 7, 4:15*pm, gary wrote:

On Nov 7, 4:07*pm, Don Guillett wrote:


On Nov 7, 5:56*pm, gary wrote:


How can I write a formula to compare the contents of two cells and do
one thing if the font colors are the same and do a different thing if
the font colors are different?


How did the fonts become colored, manually, or by conditional
formatting?
Also, which version of excel ________?


Manually.


Microsoft Office Excel 2007.


Sub ifManualColor()For Each c In Range("R1:R6")'MsgBox
c.Interior.ColorIndexIf c.Interior.ColorIndex = 36 ThenMsgBox
cElse'whatEnd IfNext cEnd Sub


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Compare font colors

On Nov 8, 7:05*am, Don Guillett wrote:
On Nov 7, 6:19*pm, gary wrote:









On Nov 7, 4:15*pm, gary wrote:


On Nov 7, 4:07*pm, Don Guillett wrote:


On Nov 7, 5:56*pm, gary wrote:


How can I write a formula to compare the contents of two cells and do
one thing if the font colors are the same and do a different thing if
the font colors are different?


How did the fonts become colored, manually, or by conditional
formatting?
Also, which version of excel ________?


Manually.


Microsoft Office Excel 2007.


Sub ifManualColor()For Each c In Range("R1:R6")'MsgBox
c.Interior.ColorIndexIf c.Interior.ColorIndex = 36 ThenMsgBox
cElse'whatEnd IfNext cEnd Sub


OK you did ask for font color and a formula. How about a UDF?
Put this in a REGULAR module and then simply use =ic(a2) to check for
blue font

Function ic(x As Range)
If x.Font.ColorIndex = 5 Then
ic = "blue"
Else
ic = "notblue"
End If
End Function



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Compare font colors

On Nov 8, 7:05*am, Don Guillett wrote:
On Nov 7, 6:19*pm, gary wrote:









On Nov 7, 4:15*pm, gary wrote:


On Nov 7, 4:07*pm, Don Guillett wrote:


On Nov 7, 5:56*pm, gary wrote:


How can I write a formula to compare the contents of two cells and do
one thing if the font colors are the same and do a different thing if
the font colors are different?


How did the fonts become colored, manually, or by conditional
formatting?
Also, which version of excel ________?


Manually.


Microsoft Office Excel 2007.


Sub ifManualColor()For Each c In Range("R1:R6")'MsgBox
c.Interior.ColorIndexIf c.Interior.ColorIndex = 36 ThenMsgBox
cElse'whatEnd IfNext cEnd Sub


I thought I had posted this. Put in regular module and then =ic(a2) to
check for blue

Function ic(x As Range)If x.Font.ColorIndex = 5 Thenic = "blue"Elseic
= "notblue"End IfEnd Function
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Font Colors Value increases with increase in font.[_2_] Excel Discussion (Misc queries) 2 April 24th 09 09:47 AM
Lost highlighting and font colors; background colors on web pages Jan in Raleigh Excel Discussion (Misc queries) 2 July 31st 07 09:10 PM
font colors Jill Excel Discussion (Misc queries) 2 May 10th 07 07:17 PM
Font Colors Marcia Setting up and Configuration of Excel 1 March 5th 06 02:08 AM
Can't format font colors or cell fill-in colors canoeron Excel Discussion (Misc queries) 3 August 22nd 05 11:46 PM


All times are GMT +1. The time now is 04:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"