+ Reply to Thread
Results 1 to 4 of 4

Format with spaces in between with specific conditions

  1. #1
    Registered User
    Join Date
    07-20-2011
    Location
    Kerala, India
    MS-Off Ver
    Excel 2013
    Posts
    93

    Thumbs up Format with spaces in between with specific conditions

    Hi!

    Thank you for all the support.

    I have a column : Customer Number

    Customer Number: we have 2 types of customer numbers (12 or 13 alphanumeric)

    eg: 446828442414 (12 alphanumeric) or 8144144141442 (13 alphanumeric)

    and need them formatted according to number of digits

    If 12 alphanumeric: 00<3space>0<3space>00<3space>00<3space>00<3space>000
    i.e. : 44 6 82 84 42 414

    or if 13 alphanumeric: 000<3space>000<3space>00<6space>00<3space>0<3space>00
    i.e.: 814 414 41 41 4 42

    suggestion: IF (No. of characters = 12) use 12 alphanumeric space format

    or

    IF (No. of characters = 13) use 13 alphanumeric space format


    Appreciate your valuable time and effort
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Format with spaces in between with specific conditions

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,418

    Re: Format with spaces in between with specific conditions

    You can use this in B2:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    then copy down.

    Hope this helps.

    Pete

    EDIT: Almost snap, Martin.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Format with spaces in between with specific conditions

    also if they are mixed alpha numeric
    then
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    you could simply type the spaces rather than using rept(" ",3) if you want

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 08-02-2012, 12:48 PM
  2. Replies: 3
    Last Post: 07-11-2012, 06:36 PM
  3. Replies: 1
    Last Post: 05-18-2006, 11:45 PM
  4. Add spaces for specific fields to paste in
    By Corey in forum Excel General
    Replies: 3
    Last Post: 12-30-2005, 06:25 PM
  5. [SOLVED] Replacing specific characters with spaces
    By Night Owl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-13-2005, 01:06 PM

Tags for this Thread

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