+ Reply to Thread
Results 1 to 9 of 9

Find a word and change font color

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    Auburn, Al.
    MS-Off Ver
    Excel 2010
    Posts
    1

    Find a word and change font color

    search for a word(the word in cell C1) within column A and change font color. Each cell in column A
    has a different sentence.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Find a word and change font color

    Try this

    Please Login or Register  to view this content.
    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007/2010.
    Martin

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find a word and change font color

    @mice

    Which part of the code must change if the strings are in other column(example:G:G, or H:M, OR L:L and P:P)?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Find a word and change font color

    The line containing Range(Cells(1, 1), Cells(Rows.Count, 1).End(xlUp)) would need to change with the second number in the two Cells objects changing to match the column number. E.g Range(Cells(1, 13), Cells(Rows.Count, 13).End(xlUp)) for Column M.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find a word and change font color

    Thanks for the feed back Martin.

    As i understand, this code can work only for one column. Not many columns. Correct?

  6. #6
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Find a word and change font color

    The original question specified column A and my answer referred to this.

    For many adjacent columns, you could use Range(Cells(1, 6), Cells(Rows.Count, 13).End(xlUp)) for columns F to M making the assumption that the number of rows to look at was defined by the bottom cell in column M.

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find a word and change font color

    ..The original question specified column A and my answer referred to this.
    Yes i know.

    I don't have a same issue at all. I found this thread interesting and and it was an opportunity for me to learn new things.

    I apologize if tired you with my questions

    Thank you for all your answers.

  8. #8
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Find a word and change font color

    No problem

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find a word and change font color

    Happy New Year for you and your family!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1