+ Reply to Thread
Results 1 to 5 of 5

count the length of each cell in a row and change color if greater than 24

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Glasgow, KY
    MS-Off Ver
    Excel 2007
    Posts
    2

    count the length of each cell in a row and change color if greater than 24

    Looking for help in creating a macro that will count the length of each cell in column "F", and if any cell is over 24 characters in length, color the cell green. Thanks in advance for any help
    Last edited by mshirley15; 11-09-2012 at 03:53 PM.

  2. #2
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: count the length of each cell in a row and change color if greater than 24

    Try
    Please Login or Register  to view this content.
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: count the length of each cell in a row and change color if greater than 24

    Please Login or Register  to view this content.
    Maybe this one
    "=LENGTE(F1)>24"

    has to be (for the english version).
    "=LEN(F1)>24"
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Registered User
    Join Date
    10-10-2012
    Location
    Glasgow, KY
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: count the length of each cell in a row and change color if greater than 24

    Works perfect WasWodge, thanks for your help.

    p.s. love the your avatar

  5. #5
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: count the length of each cell in a row and change color if greater than 24

    Your welcome but you should also consider the code from oeldere (shorter version below) as because it uses conditional formatting it will change as you change each cell (depends what you need it for) and it doesn't loop.

    Please Login or Register  to view this content.
    Obviously you can change the range to Columns("F:F").Select if you wish, I just prefer not to select whole columns
    Last edited by WasWodge; 11-09-2012 at 04:27 PM.

+ 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