+ Reply to Thread
Results 1 to 4 of 4

Select Multiple Cells at one time based on the lenght of the cell content

  1. #1
    Registered User
    Join Date
    06-02-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    3

    Select Multiple Cells at one time based on the lenght of the cell content

    In Excel conditional formatting we are able to highlight the cells based on the length of the cell content. But what i am looking for is, whether we can select multiple cells on one time based on the length of the CELL CONTENT.

    Thanks.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Select Multiple Cells at one time based on the lenght of the cell content

    This will select all cells with content length >2.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-02-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Select Multiple Cells at one time based on the lenght of the cell content

    Thanks for your reply. But I am sorry, I forget to make it a point, that what I am expecting is without using LOOP; Since when I a code with a loop like this in a excel document which contains 5K+ rows of data, the performance of excel will be least. In my current scenario I have used Loop only to achieve this but trying to OPTIMIZE the code to improve performance.

    Any kind of help is much appreciated. Thanks in advance.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Select Multiple Cells at one time based on the lenght of the cell content

    See the definition of the FindAll function located on this page.

    You can use this function like this

    Please Login or Register  to view this content.
    to select all cells with a length >= 2. Use a "?" for each required character. It uses Find and therefore will give you better performance than a For loop. I have tested it but it's not my code so I don't support it.

+ 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. Automatically copy cells content based on the content of another cell.
    By chrisbarlow1984 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-01-2014, 11:13 AM
  2. VBA to select print area based on content in cells
    By Kevlo79 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2012, 07:25 PM
  3. Select range based on variable cell content
    By NoCanDo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2009, 03:18 AM
  4. Select Range based on cell content
    By Brokovich in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2007, 06:56 AM
  5. Replies: 2
    Last Post: 12-19-2006, 10:50 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