+ Reply to Thread
Results 1 to 3 of 3

how to count number of characters in a cell

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    how to count number of characters in a cell

    Is there a formula that can count the number of characters in a cell? For example, if a cell has two numbers 21, then I want it to add two zero's to the end of the number, if it has three characters 212, then add one zero to the end of the number.

    Please Login or Register  to view this content.
    Last edited by Mile029; 06-05-2013 at 10:55 PM.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: how to count number of characters in a cell

    hi Mile029. as text or numbers? as text:
    =A2&REPT(0,4-LEN(A2))

    as numbers:
    =A2*(1&REPT(0,4-LEN(A2)))+0

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: how to count number of characters in a cell

    =LEN, that's what I was looking for, thanks benishiryo, I used the following, easier for me to understand:
    =IF(LEN(A3)=2,(A3&"00"),IF(LEN(A3)=3,(A3&"0"),A3)). Thanks for the count length formula.

+ 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