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?
0
Utf
2/7/2010 2:30:01 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
780 Views

Similar Articles

[PageSpeed] 46

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 here:
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
0
Dave
2/7/2010 3:14:28 PM
Reply:

Similar Artilces:

CDialog background color
Hello, How can change the background colour of a dialog programmatically? Best regards >How can change the background colour of a dialog programmatically? Handle the WM_CTLCOLORDLG message (OnCtlColor CTLCOLOR_DLG in MFC) and return a brush of the colour you want. Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq Thanks but it didn't work! here is the code that I wrote: HBRUSH CDialogAppCon::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); // TODO: Change any attributes of the DC here // TODO: Return a different b...

How do I get a sum of every seventh cell in a column?
Hello I am trying to find out how to get a sum of cells with a specific fixed interval between them This will sum every seventh value in column A =SUMPRODUCT(--(MOD(ROW(A1:A100),7)=1),A1:A100) best wishes -- Bernard Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme "Jubilado" <Jubilado@discussions.microsoft.com> wrote in message news:44571D0E-0C6F-47BD-97D4-0C98EA596E6A@microsoft.com... > Hello I am trying to find out how to get a sum of cells with a specific > fixed > interval between them What is the range of cells you want to sum? A...

Color
Hi, I'm a new programmer with C++ We are using VC++6 I'd like to know if it's possible to give a backgroung color to a label (static text) from my code. I want to change the background color of a lable (static text) depending on what the user choose from a combo box color Thanks I think you can subclass your "static class" window and write your own WM_ERASEBKGND message handler.... Something like this: ------%<-----------%<--------------- class CMyStaticText: public CStatic { public: afx_msg BOOL OnEraseBkgnd(CDC *); DECLARE_MESSAGE_MAP() } BEGIN_MES...

Automatically Updating Excel Data In Word Doc Inside Excel File
I have inserted a "Word" object icon into an Excel file (Tab 1) and then used paste link to display data updates from other tabs in the same Excel file in the Word document that is in Tab 1. I am looking for a way to have the links from the Excel Tab 1 file that are in the Word file automatically updated and independent of the Excel filename. Problem is that when I put the Word document icon into the Excel file, open it, paste link data from the same Excel file and then rename the Excel file later the links are not automatically reflecting the new Excel name. The new Exce...

Change cell color after processes
In this program which works until I added the .cells color - basically I want to color the cell if it existed and was moved or a different color if the file was not found. I keep getting a type mismatch. The code is below. 'Primary program ' Sub RunThroughList() Dim I As Long Dim Destination As String Dim Lastrow As Long Lastrow = Worksheets(1).Cells(Rows.Count, 1).End(xlUp).Row For I = 1 To Lastrow MoveFiles Range("A" & I).Value, "P:\Web_ICC\Archive_Test\", I Cells("A", I).Interior.ColorIndex = 6 Next End Sub 'Sub routin...

How do I stop Word putting text at bottom of page onto next page?
Word pushes some text at the bottom of the page onto the next page, thereby creating a gap at the bottom of the page. How do I get Word to stop doing this? The following settings may be relevant in such a case: "Keep with next," "Keep lines together," and "Widow/orphan control" (all found in the Paragraph dialog box). Note, however, that the best way to deal with this depends on what kind of a document you are creating. Is it a numbered outline of heading styles? A document with footnotes in it? -- Stefan Blom Microsoft Word MVP &quo...

Color Scheme Disapeared?
Several lines were shaded the standard beige that appears on the color scheme chart when the color chart icon is pressed in Excel 2000. To my surprise ... and for no known reason... all lines shaded with that color changed to a cruddy gray. When I looked at the chart again, where the beige had been is now that crummy gray... as it appears in several other boxes of that chart now. When I place my cursor over those boxes of gray, I get a text reading of "Color Scheme" rather than the name of the color the cursor is on. What the heck happened and how do I get that beige back? Never ...

Help formatting text color based on formula
I have searched the forum and find some things that help but not quite enough. I have a table of numbers. In fact there are 300 rows of 5 colums of numbers. What I would like to do is to change the color of the number if it matches one of 5 other numbers. Example Reference #s 2 6 23 43 48 01 02 09 08 14 06 14 23 43 44 03 11 23 24 52 etc etc etc etc The example list is already populated. When the reference numbers are entered I want any number in the example list that matches any number in the reference list to change to a specified color. Any way to...

Change border color of active cell??
How can i change the border color of the active cell in Ecell 2004 for MAC?? thanks ...

Table of Contents in Word 2007
Hello: How do you build a table of contents in Word? I have three major Sections (I, II, and III). Under these sections, I have further divisions like A.1.a. Thank you for your assistance. John Look up Table of Contents or TOC in Word Help, several tutorials there. John wrote: > Hello: > > How do you build a table of contents in Word? I have three major > Sections (I, II, and III). Under these sections, I have further > divisions like A.1.a. Thank you for your assistance. > > John ...

Visio image import into Word
When I am trying to paste a Visio diagram into Word 2007, I can't get it to stay with my heading. It pastes to the top of the next page. I am also having problems with the heading style when trying to delete the spaces/paragraph marks at the end of the heading to get the diagram to be together with the heading.....any suggestions? (FYI I am using a word document that has already been set up as a template document) Hi Mona - I was having the same problem. My drawing was almost a full page, yet clearly should have fit on the same page as the heading. I scaled the dra...

re: Changing subject/conversation text color <20061123223842noreply@takethisout.registrme.sent.com>
Never mind. I changed it with "Other Settings, Shade Group Headings". Couldn't change the color, but the color is now black on gray (my system setting) and is a lot better. EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com ...

color in checkbox?
Any way you can have a checkbox turn a color (fill in black or whatever color) when you click on it instead of a checkmark? -- Thanks, Sharon SHARON wrote: > Any way you can have a checkbox turn a color (fill in black or > whatever color) when you click on it instead of a checkmark? Not with a genuine form-field checkbox (although with an exit macro you could change the checkbox's font color, that's not "instead of a checkmark"). Using the technique at http://gregmaxey.mvps.org/Add_Toggle_Objects.htm, though, you can make the "checkbox" b...

Excel 2007 Change Standard Colors How?
Greetings, I just started Excel 2007. My spreadsheets typically have a lot of cells that are color filled. When I work on a old or new one, I find the light bright color fills of 2003 aren't there as defaults or easy to find without multiple clicks. Is there a way to change the standard colors presented when you click on the paint bucket? Thanks for your help! ...

Office word 2003 won't install in windows 7
The salesperson stated I need only to get the proper driver downloaded. I cannot seem to find what is needed to install my old MSOffice 2003 onto my new Windows 7 system. You only need the Office 2003 installation disk. It installs in most versions of Windows. Did the 'salesperson' sell you Office 2003, Windows 7 or the computer? What driver was the salesperson talking about? -- Terry Farrell - MSWord MVP "confeuzelled" <confeuzelled@discussions.microsoft.com> wrote in message news:E5473676-9FCF-4A83-BDF1-4BB2B196BACF@microsoft.com... > The sale...

color code
I have trying to do this, but to no avail. I want cells to change color like: more than 60 days before certain date - they're green 1 - 60 days - they're yellow 0 days and days after - they're red Format | Conditional Format | Cell Value is < A1-60 where the date to check against is in cell A1. Define your Format. Same for the other formats -- HTH... Jim Thomlinson "Shihachi" wrote: > I have trying to do this, but to no avail. > I want cells to change color like: > more than 60 days before certain date - they're green > 1 - ...

Word do not print inserted pictures
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I have some pictures inserted in a Word document. When I use print preview I can see them. If I choose file, print and preview from that window I can't see the pictures and they are not printed out either. I have tried to use arrange (in front of text) in the formatting palette but it doesn't help. Check the mfr's site for an updated driver for your printer. Also, be certain that both OS X & Office are fully updated as well as running Apple's Disk Utility - Repair Disk Permissions. ...

Create Word document and unlink fields
I have code in my database that creates a Word document from Access. The code then populates several areas of the document with fields from my database. After this, the code inserts several "includetext" fields into the word document to link data from outside sources. Everything works great until the very end. After it is done, I want to "unlink" the includetext fields to make the document static. I know how the code would look if I did it in Word's VBA, but I need to execute it from within the Access code. First, here is what I'm doing to insert the &qu...

Screen refresh error
Hi, I was a 2004 user and recently installed 08. When using tables in my document the screen would often all go grey apart from the one section of the table I was using. Not sure if this is a graphics card issue or what. It was so annoying, I had to select all so my mac would realise everything shouldnt be grey! and then i could carry on. SO.. i went back to 2004 but a similar thing happens- the screen seems to do a 'refresh' for want of a better technical term- the screen sort of flashes- in a similar way to how it did before- except without all the greyed out ...

Outlook XP error starting word as e-mail editor
I'm getting an error message in Otlook XP when I try to reply (or create a new) e-mail message that says "this form requires Word as your e-mail editor but Word is either busy or cannot be found. This form will be opened in the Outlook editor instead." I have Ofiice XP installed and want to use MS Word as my e-mail editor. What can I do to correct the error message? Thanks for your assistance. OOPS, I've just posted EXACTLY the same problem without seeing yours first, my bad :) When you open Word are you getting a 'cannot link to this document' also? >...

Word is crashing randonly
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Hi, <br><br>I've recently migrated the computer of my small office from XP Box, with Office 2003. to Mac OS X 10.6 iMacs with office 2008 <br><br>iMacs are to date, Office also up to date. <br><br>I moved all the files &quot;.doc&quot; to the Macs. Excel and Powerpoint files are working properly. <br><br>But sometimes Word is going berserk and the Beach Spinning whell is appearing, causing word to crash. <br><br>I've managed to look in t...

color tab on spreadsheet
hi I have a file with 20 tab and names nearly same. So I would like to color the tab. Do you know how to do it thanks for hel Benjamin Is only possible in Excel 2002 and 2003 Ben -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Ben.c" <anonymous@discussions.microsoft.com> wrote in message news:30C7D4B9-F271-45AF-A618-66680BF33EDE@microsoft.com... > hi, > I have a file with 20 tab and names nearly same. So I would like to color the tab. Do you know how to do it ? > thanks for help > Benjamin Only way is to get Office XP (excel 2002)...

changing font color in multiple textboxes
Hello, I am trying to find out how (if its possible) to change the font color of multiple textboxes at the same time. I changed my background and now i need all the textboxes to have white text instead of black. I have over 100 textboxes so going and changing each text box is quite annoying. Any help is appreciated. kahlan715 wrote: > I am trying to find out how (if its possible) to change the font color of > multiple textboxes at the same time. I changed my background and now i need > all the textboxes to have white text instead of black. I have over 100 > textboxe...

Result changes cell color
Is there a way to fill a cell with a color depending on the result? Basically, I want the following: If cell = 1 Fill cell with Red If cell = 2 Fill cell with Yellow If cell = 3 Fill cell with Green Thanks for any help. format>conditional format>easy from there -- Don Guillett SalesAid Software donaldb@281.com "GSBohn" <genie@cfl.rr.com> wrote in message news:uDoqd.47388$Oc.10064@tornado.tampabay.rr.com... > Is there a way to fill a cell with a color depending on the result? > > Basically, I want the following: > > If cell = 1 Fill cell with ...

printing in color paper
Hi, I'm trying to print in blue and red paper but the text always appear black no matter which font color I choose. Does any one have tried to print non black font in non white paper? Thanks a lot for your help Neither Word nor your printer has any way of knowing what color paper you are putting into your printer. If you try to print (for instance) with red ink on green paper, of course it will look black! On Feb 1, 11:41=A0am, MVR <M...@discussions.microsoft.com> wrote: > Hi, I'm trying to print in blue and red paper but the text always appear > black no m...