+ Reply to Thread
Results 1 to 8 of 8

Find and Format cells with specific text

  1. #1
    Registered User
    Join Date
    04-20-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    96

    Find and Format cells with specific text

    Hi,

    I need help to create a code that finds all cells within the sheet containing "NR/" and apply color to them. Attached is a sample book having several occurrences of it, where only part of the cell content meets that criteria (NR/). Regardless of the rest of the content within the cell, I need those cells to be applied a color (any color will do).

    Any help will be appreciated.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Find and Format cells with specific text

    You can apply Conditional Formatting...

    VBA
    Please Login or Register  to view this content.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Find and Format cells with specific text

    Hi axtryo,

    Do these steps instead of needing VBA...
    Do these steps
    1. Click on the Find & Select Icon on the Home Tab
    2. Click on Find and put "NR/" in the find box
    3. Click on the Find All button
    4. Click on Ctrl+A to select All the found cells
    5. Use the Font Icons on the Home tab to format these cells any way you want.

    See the attached where I've done the above.

    Find and Select to Font LOCATION SHEET.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    04-20-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Find and Format cells with specific text

    Hi Jindon,

    Thank you for your help! The code works, but it's until now that I see it applied, I'm coming to realize my approach was probably not the best to fit my need. What I'd rather have, is any cell in column B (SKU), highlighted in color, if and only if, the adjacent cells in the same row, have content starting with NR/ only, vs having content that starts with any other letters (BS, AG, AL, etc). The last 2 items within the spreadsheet (29 & 30) are the only cases within the sheet meeting that criteria, and those are the ones I actually need to target.

    I hope you can help me with this!

    Thanks!

  5. #5
    Registered User
    Join Date
    04-20-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Find and Format cells with specific text

    Hi Marvin!,

    Yes, I have followed the steps you listed. My need to have code to do it for me, is that having to do it on several sheets becomes time consuming and not exactly efficient. But thanks for taking the time to respond to my post.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Find and Format cells with specific text

    Is this how you wanted?
    Please Login or Register  to view this content.
    Edit:code changed
    Last edited by jindon; 05-31-2017 at 01:06 AM.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Find and Format cells with specific text

    @jindon,

    What is Cells(1)?

    I'm used to notation like Cells(5,2) or Cells(5,"B") which is Cells(Row,Column) notation, but Cells(1)? Is this really Row 1 and all columns, or is it a Range with only a single cell?

  8. #8
    Registered User
    Join Date
    04-20-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Find and Format cells with specific text

    Hi Jindon,

    Yes, that's exactly what I needed. Again, thank you SO much for your help! I'll wait to see if you can answer Marvin's question, and then I'll mark this post as solved.

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] In a specific column find text and change the format
    By Louisa Venter in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-22-2015, 02:43 PM
  2. [SOLVED] VBA to find text in specific format in a workbook
    By chataylo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-14-2014, 06:37 PM
  3. Find Cells Containing a Specific Number Format
    By alpinegroove in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-06-2014, 10:43 PM
  4. How can I find and format specific cells automatically in Excel?
    By Gary's Student in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 07:05 AM
  5. How can I find and format specific cells automatically in Excel?
    By Amy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  6. [SOLVED] How can I find and format specific cells automatically in Excel?
    By Amy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. How can I find and format specific cells automatically in Excel?
    By Amy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-06-2005, 11:05 AM

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