Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default Using Font Colour



"titus" wrote:


Kevin wrote:
Hi,

If i have a list in column A. Some have black fonts and others have blue
fonts. How can I have the cell next to the black font in column B to say
'true' and the cell next to the blue font to say 'false'

Cheers

Kevin


Put your data in column A and select it and put this code in the vba
editor under module

Sub trueorfalse()
Dim cell As Range

For Each cell In Selection
If cell.Font.ColorIndex = 5 Then
Cells(cell, 2) = "False"
Else
Cells(cell, 2) = "True"
End If
Next cell

End Sub

Cheers
titus

Hi titus,


I have tried this but it does not seem to work. Please could you give me
step by step instructions.

Cheers

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
different colour font in same cel ILMER57 Excel Worksheet Functions 4 April 12th 10 04:57 PM
textBox font colour the same as cell font colour???????? Sophie Excel Discussion (Misc queries) 4 February 13th 09 10:15 AM
Change font colour [email protected] Excel Discussion (Misc queries) 3 December 23rd 06 07:07 PM
Font colour phil2006 Excel Discussion (Misc queries) 1 July 31st 06 02:15 PM
can the fill colour of a bar be tied to the data font colour data PaulC Charts and Charting in Excel 0 June 23rd 06 01:21 AM


All times are GMT +1. The time now is 05:17 PM.

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

About Us

"It's about Microsoft Excel"