+ Reply to Thread
Results 1 to 8 of 8

format text and number

  1. #1
    Registered User
    Join Date
    10-15-2011
    Location
    bangalore
    MS-Off Ver
    Excel 2010
    Posts
    99

    format text and number

    hi all ,

    can some body can help me on this,


    a1 contains = r12

    b1 i want it as = 000r12

    is there any way to do this.

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

    Re: format text and number

    does this formula work for you (in cell B1):

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: format text and number

    Hi

    ..Where will you use the 000r12 result??

    Because a simple way to do this, is to use a helper column.

    A1=r12 >> C1(helper & hide column)>>(Texr Format)>>000. Then in B1=C1&A1

    Hope to helps you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    10-15-2011
    Location
    bangalore
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: format text and number

    sorry i di not give the clear information in a coloumn their are diffrent varities

    like

    a1: r12
    a2 :123h
    a3:125a

    but all i want in 6 digits

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

    Re: format text and number

    how about
    Please Login or Register  to view this content.

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: format text and number

    ..Then try this:

    =IF(LEN(A2)=3;"000"&A2;IF(LEN(A2)=4;"00"&A2;IF(LEN(A2)=2;"0000"&A2;IF(LEN(A2)=5;"0"&A2;""))))

    Is it ok for you?

  7. #7
    Registered User
    Join Date
    10-15-2011
    Location
    bangalore
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: format text and number

    hi all ,

    thank you so much

    i have found a simple way, it might be useful to you also some times
    =RIGHT("000000"&a1,6)

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

    Re: format text and number

    neat!

    Do you ever have values with more than 6 characters - if so, how do you want them treated? Your formula will give the right six characters, mine would give the whole of A1

+ 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