+ Reply to Thread
Results 1 to 5 of 5

Custom format help

  1. #1
    Registered User
    Join Date
    09-20-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Custom format help

    Hello

    I have a Column get the SQL data on the way

    Step 7,8,9,10,11,13,14

    When i sort it comes like this 10, 11, 13, 14, 7, 8, 9

    So Using macro or any other way i want to add
    Step 01, 02, 03, 07, 08 and if its more than two digti leave as it is step 10, 11,13

    Then when i sort i will get Step 07, 08, 09, 10

    ANy tips
    Attached Files Attached Files
    Last edited by qazqaz; 10-18-2010 at 02:15 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Custom format help

    Put this in B2 and copy down:

    =IF(LEN(SUBSTITUTE(A2,"Step ",""))>1, A2, "Step " & TEXT(SUBSTITUTE(A2,"Step ",""), "00"))


    Now sort by this column.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-20-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Custom format help

    I am not sure where to put and how to put this formula. I am new to excel format. Can you help me? I tried in

    Excel - Format Menu and tools menu also. When i type this formula it display error.

  4. #4
    Registered User
    Join Date
    09-20-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Custom format help

    I got it now. thanks for your help

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Custom format help

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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