Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How toChange color of first letter inEach word ofA column at once

Just imagine cell A1 "all". Now imagine cell A2 containing "ball" and then
cell A3 containing "call" and so on for many more words in this A column.
How can I change the color of just the first letter of every word in this
column?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How toChange color of first letter inEach word ofA column at once

As long as the cell contains text (not a formula and not a number), you can
highlight the first letter of each cell in the formulabar and use Format|Cells
(xl2003 menus) to change the font color.

You could use a macro to do the work, too:

Option Explicit
Sub testme()

Dim myCell As Range
Dim myRng As Range
Dim wks As Worksheet

Set wks = Worksheets("Sheet1")

With wks
Set myRng = Nothing
On Error Resume Next
Set myRng = .Range("A1", .Cells(.Rows.Count, "A").End(xlUp)) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
On Error GoTo 0
End With

If myRng Is Nothing Then
MsgBox "No text constants in the range!"
Exit Sub
End If

For Each myCell In myRng.Cells
With myCell.Characters(Start:=1, Length:=1).Font
' .Name = "Arial"
' .FontStyle = "Regular"
' .Size = 10
' .Strikethrough = False
' .Superscript = False
' .Subscript = False
' .OutlineFont = False
' .Shadow = False
' .Underline = xlUnderlineStyleNone
.ColorIndex = 3 'red on my pc
End With
Next myCell
End Sub

I commented out the lines that changed the format for that character. I thought
you may want to change them, too.

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)



LSSK wrote:

Just imagine cell A1 "all". Now imagine cell A2 containing "ball" and then
cell A3 containing "call" and so on for many more words in this A column.
How can I change the color of just the first letter of every word in this
column?


--

Dave Peterson
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
How do I keep the first letter of each word in that column. Felecia Excel Worksheet Functions 3 August 11th 08 04:39 PM
XML defaulting ss:Type 4 all cells in a column, not ineach <data Francisco Excel Discussion (Misc queries) 0 January 11th 08 05:31 PM
change first letter of a word for an entire column lori12844 Excel Discussion (Misc queries) 5 May 30th 07 06:06 AM
Default Capital letter for 1st letter of a word Jeff Excel Discussion (Misc queries) 6 July 10th 06 08:36 AM
How to replace column letter in refferences with a function using the old column letter? Dmitry Kopnichev Excel Worksheet Functions 6 October 13th 05 09:09 AM


All times are GMT +1. The time now is 06:21 AM.

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"