+ Reply to Thread
Results 1 to 8 of 8

Counting within a cell

  1. #1
    Registered User
    Join Date
    05-21-2012
    Location
    Japan
    MS-Off Ver
    Excel 2007
    Posts
    3

    Counting within a cell

    Hi
    I want to count how many characters there are within a cell, I'm using =LEN(D235) to count the characters, no problem but my query is.... if the cell contains no character then how do I get it to default to show 1 and not 0 ??
    Thanks

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Counting within a cell

    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Counting within a cell

    Hi,

    =max(1,len(d235))
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Counting within a cell

    hello

    space not include in count

    =MAX(1,LEN(SUBSTITUTE(d235," ","")))
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,271

    Re: Counting within a cell

    Hey Vlady,

    Do you thing spaces don't or shouldn't count in a length of string? I must have missed that in my education. Please point me to a link.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Counting within a cell

    just giving the op option on whether to count space between the words...

    or better issue a trim before count to delete spaces. sometimes mistakenly press spacebar before enter.

    =MAX(1,LEN(TRIM(d235)))

    space Hello there. space

  7. #7
    Registered User
    Join Date
    05-21-2012
    Location
    Japan
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Counting within a cell

    Thanks Nicky
    Quote Originally Posted by NickyC View Post
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-21-2012
    Location
    Japan
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Counting within a cell

    Thanks Haseeb.... sorry my first post, now I now the solved icon !!
    Quote Originally Posted by Haseeb A View Post
    Hi,

    =max(1,len(d235))

+ 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