+ Reply to Thread
Results 1 to 3 of 3

determine if ea value in a col has more than 20 chars

  1. #1
    pmms
    Guest

    determine if ea value in a col has more than 20 chars

    I know I have to use LEN in a loop but I don't know VBA and need this info
    asap. can you help?

  2. #2
    Don Guillett
    Guest

    Re: determine if ea value in a col has more than 20 chars

    for each c in range("a2:a22")
    if len(c)>20 then msgbox "Bingo"
    next c

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "pmms" <[email protected]> wrote in message
    news:[email protected]...
    >I know I have to use LEN in a loop but I don't know VBA and need this info
    > asap. can you help?




  3. #3
    Ron Coderre
    Guest

    RE: determine if ea value in a col has more than 20 chars

    Try something like this:

    For a list of text values, or blanks, in A10: A20

    A1: =SUMPRODUCT(--(LEN(A10:A20)>20))=ROWS(A10:A20)

    That formula returns TRUE if all of the referenced cells contain values and
    the length of those values is greater than 20 characters. It returns FALSE
    if any of the cells is blank or has a length of 20 characters or less.

    Does that help?

    ***********
    Regards,
    Ron

    XL2002, WinXP-Pro


    "pmms" wrote:

    > I know I have to use LEN in a loop but I don't know VBA and need this info
    > asap. can you help?


+ 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