+ Reply to Thread
Results 1 to 4 of 4

Using Cell Find in VBA highlight multiple Row

  1. #1
    Registered User
    Join Date
    01-19-2013
    Location
    San Jose, CA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Post Using Cell Find in VBA highlight multiple Row

    Hi I am new to VBA and I need help.

    I want to find a text in a worksheet which repeats itself multiple time. Then i want to select the entire row which contain that text and add a style "Good"

    The code below only only adds style to the first row and not the rest.

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 01-19-2013 at 09:22 PM. Reason: Added Code tags

  2. #2
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Using Cell Find in VBA highlight multiple Row

    You could use something like the following which will find a range containing the values you are searching for (in this case "Run")
    Please Login or Register  to view this content.
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  3. #3
    Registered User
    Join Date
    01-19-2013
    Location
    San Jose, CA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Using Cell Find in VBA highlight multiple Row

    Thanks you for the quick response.

    The code works. I ran it with open workbook. I really appreciate you assistance.

    I notice that when running the code it took alot of processing power and time for it to complete over 60000 rows of records.

    I will use the above code for now unless someone knows a faster way of doing this.

    I was thinking about what if i create a key where the content is only column A rather then searching the entire workbook.

  4. #4
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Using Cell Find in VBA highlight multiple Row

    If the content is only in column A then the code should be amended to
    Please Login or Register  to view this content.
    The way you worded your question was that the word "Run" could be anywhere - as such I made the search range the entire sheet - condensing it to column A would be faster. If you only wanted to colour the cell with the word then I would use conditional formatting rather than using VBA

+ 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