+ Reply to Thread
Results 1 to 7 of 7

Searching for Cell Content Larger than Find Function's Character Limit

  1. #1
    Registered User
    Join Date
    12-09-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Searching for Cell Content Larger than Find Function's Character Limit

    I am trying to search for a paragraph, which is written in a cell over a range of other cells, with the intention of hiding the row that contains it. Since all this needs to be automated, I'm trying to use VBA script like

    Set result = searchRange.Find(What:=search, LookIn:=xlValues)
    If result Is Nothing Then
    Exit Sub
    End If
    Range(result.MergeArea.Address).EntireRow.Hidden = True


    But the paragraph I'm looking for is 300+ characters - larger than the character limit the range.Find method has, so Result comes back as nothing when it should not be.

    Does anyone have some idea on how to get around this?

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Searching for Cell Content Larger than Find Function's Character Limit

    Try something like this...

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-09-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Searching for Cell Content Larger than Find Function's Character Limit

    Thanks AlphaFrog, that does help.

    But does anyone know if there is a way to do this without having to cut off half of the paragraph?

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Searching for Cell Content Larger than Find Function's Character Limit

    Quote Originally Posted by spira View Post
    Thanks AlphaFrog, that does help.

    But does anyone know if there is a way to do this without having to cut off half of the paragraph?
    Do you have other similar paragraph's it could erroneously match the first 255 characters?

  5. #5
    Registered User
    Join Date
    12-09-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Searching for Cell Content Larger than Find Function's Character Limit

    Quote Originally Posted by AlphaFrog View Post
    Do you have other similar paragraph's it could erroneously match the first 255 characters?
    I might. The paragraphs are going to change regularly, and some of them get very similar - currently none of them do, but later ones may.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Searching for Cell Content Larger than Find Function's Character Limit

    Quote Originally Posted by spira View Post
    I might. The paragraphs are going to change regularly, and some of them get very similar - currently none of them do, but later ones may.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-09-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Searching for Cell Content Larger than Find Function's Character Limit

    That is brilliant. Thanks so much :

+ 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