+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 28

Thread: formula required to sort numbers as per given in sheet

  1. #1
    Registered User
    Join Date
    03-24-2006
    Posts
    21

    formula required to sort numbers as per given in sheet

    Hello

    I am having some data in excel sheet with following column headings

    Emp ID Employee Name Dept
    1234 dinesh sales
    3444 ramesh marketing
    3333 daret rnd
    2000 john admin

    Now i want to sort complete data in ascending order according to emp id.. please suggest me any function which can do this for complete sheet accordingly according to emp id

    for details go through the attached sheet which i want to sort according to employee id
    Attached Files Attached Files
    Last edited by kaustubhghag; 12-10-2008 at 02:15 AM.

  2. #2
    Valued Forum Contributor vandanavai's Avatar
    Join Date
    09-04-2006
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    249
    Hello

    Use Data->Sort->in ption 'Sort By' select Employee No. and also select option 'Ascending'

  3. #3
    Registered User
    Join Date
    03-24-2006
    Posts
    21
    Thanks for reply but i want some function in excel which can do the task.. like if, avg etc. through which i can select the cells and do the same

  4. #4
    Valued Forum Contributor vandanavai's Avatar
    Join Date
    09-04-2006
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    249
    Hello

    U can split First field in your daily sheet using Delimit function or if Emplyee No. is of fixed width than using Left Function and then sort sheet

  5. #5
    Valued Forum Contributor vandanavai's Avatar
    Join Date
    09-04-2006
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    249
    Hello

    What do u mean by Function? u mean it should be done automatically? then u should record macro for the same

  6. #6
    Registered User
    Join Date
    03-24-2006
    Posts
    21
    Thanks for reply but actually the things is that this sheet is generated from one of application but employee id is not getting shown according to acending format. so please give me any solution for the same.

  7. #7
    Valued Forum Contributor vandanavai's Avatar
    Join Date
    09-04-2006
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    249
    Hello

    If sheet is always in same formaat,then u can use macro by copying vb code from earlier file.

  8. #8
    Registered User
    Join Date
    03-24-2006
    Posts
    21
    I do not have any sample code available from macro to sort data.. if you have an example then please give me so that i can check

  9. #9
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,640
    Try recording a macro to start with, see
    http://www.excel-it.com/record_macro.htm
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  10. #10
    Registered User
    Join Date
    03-24-2006
    Posts
    21
    Quote Originally Posted by royUK View Post
    Try recording a macro to start with, see
    http://www.excel-it.com/record_macro.htm
    hello i have tried but it wont give me formula.. one of my friend suggested me to check formula from following site..

    can anybody please try to give me formula using code from following link:

    http://chandoo.org/wp/2008/10/22/sor...sing-formulas/

  11. #11
    Registered User
    Join Date
    03-24-2006
    Posts
    21
    Quote Originally Posted by vandanavai View Post
    Hello

    If sheet is always in same formaat,then u can use macro by copying vb code from earlier file.
    hello i have tried but it wont give me formula.. one of my friend suggested me to check formula from following site..

    can anybody please try to give me formula using code from following link:

    http://chandoo.org/wp/2008/10/22/sor...sing-formulas/

  12. #12
    Forum Guru
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2003
    Posts
    2,288
    I think the problem might be that the sheet is protected(?)


    If this is the case, the obvious solution is to ask the provider to remove the protection (or provide you with the password). The next-best is to copy the contents out to another sheet, but this is awkward.

    Can you ask whoever makes the sheet to remove the protection or provide you with a password?

    CC

  13. #13
    Registered User
    Join Date
    03-24-2006
    Posts
    21
    Quote Originally Posted by Cheeky Charlie View Post
    I think the problem might be that the sheet is protected(?)


    If this is the case, the obvious solution is to ask the provider to remove the protection (or provide you with the password). The next-best is to copy the contents out to another sheet, but this is awkward.

    Can you ask whoever makes the sheet to remove the protection or provide you with a password?

    CC

    Hello

    Go through the attached sheet which is without password protection
    Attached Files Attached Files

  14. #14
    Forum Guru
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2003
    Posts
    2,288
    That's great, so that's one problem out of the way!

    Sorry kaustubhghag, why is it that you want to use a formula instead of just sorting the data with the 'A-Z' button?

    CC

    PS the array formula in the second attachment of your first post doesn't make sense...

  15. #15
    Registered User
    Join Date
    03-24-2006
    Posts
    21
    Quote Originally Posted by Cheeky Charlie View Post
    That's great, so that's one problem out of the way!

    Sorry kaustubhghag, why is it that you want to use a formula instead of just sorting the data with the 'A-Z' button?

    CC

    PS the array formula in the second attachment of your first post doesn't make sense...
    hello

    Thanks for reply. Actual case is that this sheet is generated from one software and we want to write one formula based upon employee id that according to employee id whole sheet gets sorted out..

    everytime we do not want to use excel asecending and descending btn.. instead we will just write formula so that it will sort data at runtime generattion of sheet

+ 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.2.0