+ Reply to Thread
Results 1 to 4 of 4

Highlighting range of cells based on an array if-statement (not using loops)

  1. #1
    Forum Contributor
    Join Date
    05-04-2014
    Location
    New Jersey, United States
    MS-Off Ver
    Excel 2010, 2013
    Posts
    120

    Highlighting range of cells based on an array if-statement (not using loops)

    I couldn't find an answer that seemed to work for me. I have a range of cells containing strings that need to be highlighted green based on if the last character of the string contains a "®" symbol (Alt+0174 on the number pad).
    The data is on Sheet1 in the range A2:A & LR where "LR" is the variable last row of data. The last row can be as high as 600,000 so looping through the range the usual way takes longer than I'd like it to.

    Is there a way to loop through using an array instead? I use Windows 7 and Excel 2010 btw.

    Thank you in advance for your help!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,331

    Re: Highlighting range of cells based on an array if-statement (not using loops)

    Using filters:

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Highlighting range of cells based on an array if-statement (not using loops)

    @Bernie Deitrick

    If the condition is for the last character (®) only, the code should be like this.....(make me correct if I am wrong.)
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,331

    Re: Highlighting range of cells based on an array if-statement (not using loops)

    You're correct, if the character can appear anywhere in the string and the OP only wants terminal characters. But if it can only appear at the end anyway, or is followed by a space, then the *®* is better.

+ 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. Highlighting a range from A:I based on condition
    By naga in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2014, 04:46 AM
  2. Highlighting cells based on IF THAN statement
    By brianjbostic in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-16-2013, 03:46 PM
  3. Highlighting range of cells based on start and end dates
    By d0gp1l3 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-13-2012, 12:36 PM
  4. Replies: 4
    Last Post: 11-01-2011, 05:52 AM
  5. average on time cells, range definite with loops
    By Astrid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2009, 05:49 PM

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