+ Reply to Thread
Results 1 to 24 of 24

sorting unique cells in new column

Hybrid View

  1. #1
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Unhappy sorting unique cells in new column

    Hi, I'm new excel user
    Have both version at once (2003 and newest 2010).
    My problem is extracting unique names in new column and and summarize his values.

    col_A col_B col_C col_D col_E
    -------------------------------------------------
    DDD.......10
    CCC.........5
    AAA.......10
    BBB.......10
    AAA.........5
    CCC.........5
    CCC.......10
    BBB.......10
    ....

    In col_C want sorted unique names from col_A (removing empty cels)
    In col_D I want summarized all 5's for given name in col_A (for C = 5+5 = 10)
    In col_E I want same, but for values 10.( for B = 10+10 = 20)

    so the outcome will look something like

    col_A col_B col_C col_D col_E
    -------------------------------------------------
    DDD.....10.....AAA.......5........10
    CCC.......5.....BBB.................20
    AAA.....10.....CCC......10........10
    BBB.....10.....DDD.................10
    AAA.......5
    CCC.......5
    CCC.....10
    BBB.....10
    ....
    For extraction I played with formula
    {=INDEX(List,MATCH(0,COUNTIF(($B$1:B1,List),0))} but something is wrong and I do not know what to do next....
    Can someone help me with am problem please. I don't know is it possible at all.

    Kind regards, Bojan
    Last edited by Altar46; 08-29-2011 at 12:40 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,637

    Re: sorting unique cells in new column

    Here, try this:

    (note: it won+t work for XL 2003)
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Thank you for quick reply zbor, ...

    I'm sending you whole example with chosen names (from everywhere)....
    As I adding names on daily basis (hardly more than 300) can formula recognize new entries and work on them
    (I know I asking to much - but you was so kind...)


    thank you & kind regards
    Bojan

    PS I'm: using date field (but not time) before name column with names...
    Attached Files Attached Files
    Last edited by Altar46; 08-27-2011 at 02:28 AM. Reason: changing previously post

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: sorting unique cells in new column

    @Altar46,

    I would suggest you upload a sample file to illustrate.

  5. #5
    Registered User
    Join Date
    07-14-2011
    Location
    Ha Noi, Viet Nam
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: sorting unique cells in new column

    I have attached a test excel file to show your example.
    Attached Files :
    Attached Files Attached Files
    Last edited by sunflowers; 08-27-2011 at 01:52 AM.

  6. #6
    Registered User
    Join Date
    07-14-2011
    Location
    Ha Noi, Viet Nam
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: sorting unique cells in new column

    Please see attachment file :
    Attached Files Attached Files
    Last edited by sunflowers; 08-27-2011 at 02:54 AM. Reason: Change file name

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,637

    Re: sorting unique cells in new column

    Here is green (sunflowers) and blue (Donkeyote and sligthly mine) solution.

    If you use SUMIFS function excel will work faster than with SUMPRODUCT approach, but it work only for XL 2007+.

    Also, (in blue formula) you can add up to 10.000 names. If you want more you just need to extend ranges in formulas i.e. from $B$2:$B$10000 to $B$2:$B$30000.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Thanks guys, I did not know that the community around Excel so kind and above all fast. That all I needed. I will use blue formula wich work perfectly for me. When I complete all entrance just what I have to do is copy names in new column and sort them.

    Will try green solution for Excel 2003 which is working one. (On my laptop, Excel 2010, perform your blue formula excelent.)
    On green formula found no updatas for new entrance.... will come back on that matter after testing - need some time....

    DonkyOte, sunflowers,zbor - you are great - thanks again...
    Last edited by Altar46; 08-27-2011 at 06:11 AM.

  9. #9
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Dear friends / zbor,

    Green part of formula in your upload works ok in excel 2003 but cannot insert new data. Kindly allow me to put new names until 300 (don't need more - can be fixed 300) and Unique column is perfect because of sorting names on fly. Sorry of my ignorance.
    I'm in the middle of the sea - off Nigeria - so help you provide is priceless.

    Kind regards
    Bojan

  10. #10
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Dear friends / zbor,

    Green part of formula in your upload works ok in excel 2003 but cannot insert new data. Kindly allow me to put new names until 300 (don't need more - can be fixed 300) and Unique column is perfect because of sorting names on fly. Sorry of my ignorance.
    I'm in the middle of the sea - off Nigeria - so help you provide is priceless.

    Kind regards
    Bojan

  11. #11
    Registered User
    Join Date
    07-14-2011
    Location
    Ha Noi, Viet Nam
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: sorting unique cells in new column

    You put name List = Sheet1!$A$2:$A$300 and name List2=Sheet1!$B$2:$B$300
    Now You can Insert new Data and Remove #N/A error by ISNA() Function
    See attachment file :
    Attached Files Attached Files
    Last edited by sunflowers; 08-27-2011 at 01:52 PM. Reason: Add infomation

  12. #12
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: sorting unique cells in new column

    Quote Originally Posted by Altar46 View Post
    Green part of formula in your upload works ok in excel 2003 but cannot insert new data. Kindly allow me to put new names until 300 (don't need more - can be fixed 300) and Unique column is perfect because of sorting names on fly. Sorry of my ignorance.
    Exactly, Thanks for sunflowes' formula, it is more flexible, it can not only sort names on fly but also remove blank names.

    Quote Originally Posted by sunflowers View Post
    You put name List = Sheet1!$A$2:$A$300 and name List2=Sheet1!$B$2:$B$300
    Now You can Insert new Data and Remove #N/A error by ISNA() Function
    See attachment file :
    To improve the file for remove array-formula and #N/A at extra cells in list unique, I make combination your and DonkyOte's solution (thanks for both of you and zbor) to form a new solution in attached file version 2nd.

    @Altar46: Plz, paying attention to the name List = Sheet1!$A$2:$A$300 and List2=Sheet1!$B$2:$B$300 by press Ctrl+F3 - it is easy to adjust their reference corresponding your original data.
    Attached Files Attached Files
    Best regard, -)iger-/iger
    If you are pleased with a solution mark your post SOLVED.

  13. #13
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Quote Originally Posted by tigertiger View Post
    Exactly, Thanks for sunflowes' formula, it is more flexible, it can not only sort names on fly but also remove blank names.



    To improve the file for remove array-formula and #N/A at extra cells in list unique, I make combination your and DonkyOte's solution (thanks for both of you and zbor) to form a new solution in attached file version 2nd.

    @Altar46: Plz, paying attention to the name List = Sheet1!$A$2:$A$300 and List2=Sheet1!$B$2:$B$300 by press Ctrl+F3 - it is easy to adjust their reference corresponding your original data.
    Thanks everybody - green formula work great in Excel 2003.

    Could you please help with another solution. (not hard one I hope)
    thanks in advance - Bojan
    Attached Files Attached Files

  14. #14
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,637

    Re: sorting unique cells in new column

    Here...

    Doesn't matter is it A in the cell or not...

    For more values extend range.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Yes zbor - that's it.

    What I can say?..Thank you professor...

  16. #16
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Something is wrong...
    I cannot copy LOOKUP function. When I tried to copy your =LOOKUP(2:1/(C4:$C$10000=5):$A$4:$A$10000)

    I get result
    =LOOKUP(1:2/($C12:O$10000=5):$A$4:$A$10000) ?
    I tried changed some parameters - no result.
    Positions of calculated range is column P for starting numbers - which is OK
    and last numbers in cell next to starting value - column Q.

    Apparent that I wrongly mentioned that my calculation starting from row 4 instead of row 3
    LOOKUP function does not working in both cases...

    I cannot manually changed part of function "2:1" in "1:2".....

    regards, Bojan

  17. #17
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,637

    Re: sorting unique cells in new column

    Range is A column.
    5 and 10 numbers are P column.

    Then:

    =LOOKUP(2; 1/($P$12:$P$10000=5);$A$12:$A$10000)
    Last edited by zbor; 08-29-2011 at 02:14 AM.

  18. #18
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    unfortunately - not working

    I included example 3

    regards, Bojan
    Attached Files Attached Files

  19. #19
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,637

    Re: sorting unique cells in new column

    Do you see ; in my formula and you convert it into : ?
    I paint in red all you need to change... Not 1:2 but 2;1

    =LOOKUP(2;1/($C3:C$10000=5);$A$3:$A$10000)

  20. #20
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Quote Originally Posted by zbor View Post
    Do you see ; in my formula and you convert it into : ?
    I paint in red all you need to change... Not 1:2 but 2;1

    =LOOKUP(2;1/($C3:C$10000=5);$A$3:$A$10000)
    I did ... but... I have #VALUE! error
    Attached Images Attached Images

  21. #21
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,637

    Re: sorting unique cells in new column

    If you using other regional settings, than croatia, try , instead of ;

    =LOOKUP(2,1/($C3:C$10000=5),$A$3:$A$10000)
    Attached Files Attached Files
    Last edited by zbor; 08-29-2011 at 03:48 AM.

  22. #22
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Quote Originally Posted by zbor View Post
    If you using other regional settings, than croatia, try , instead of ;

    =LOOKUP(2,1/($C3:C$10000=5),$A$3:$A$10000)
    Not working - even worse...
    regional settings - EN English USA - location Nigeria

  23. #23
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Wait a moment - maby is working... wait pls

  24. #24
    Registered User
    Join Date
    08-26-2011
    Location
    Opatija, Croatia
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    13

    Re: sorting unique cells in new column

    Must have been witches around + myself
    Suddenly everything works....

    Hard to say, but must be my fault.....

    million thanks zbor.... have a nice day

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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