+ Reply to Thread
Results 1 to 6 of 6

If Text Lenght > x then

  1. #1
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    364

    If Text Lenght > x then

    Hi all

    I am trying to achieve that if the text lenth is greater than x do something

    So here's what I thoguth should work

    Please Login or Register  to view this content.
    Could someone take a look at this code and tell me where I am going wrong?

    Thanks a lot

    FD
    Last edited by FallingDown; 04-29-2013 at 06:50 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,463

    Re: If Text Lenght > x then

    You don't define what

    Please Login or Register  to view this content.
    is anywhere.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    364

    Re: If Text Lenght > x then

    HI Pete

    Thanks a lot for your help...
    I figure I would have had to set

    strText = Range("d" & i)

    Is this correct?

    Anyway, I just found a cleaner solution...

    Please Login or Register  to view this content.
    Thanks again anyway, you helped me understand VBA a bit better ;-)

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: If Text Lenght > x then

    Since you are already used With Range("d" & i)

    Replace
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    With
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    364

    Re: If Text Lenght > x then

    @ Sixthsense

    Actually my code workds perfectly too ;-)

    But thanks anyways, always appreaciated

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: If Text Lenght > x then

    Yeah it will work Just in case of any correction you need to change the code in one place if you mention it in that way

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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