+ Reply to Thread
Results 1 to 14 of 14

How to assign each account name with one bucket ?

  1. #1
    Registered User
    Join Date
    04-01-2022
    Location
    Dublin, Ireland
    MS-Off Ver
    365 Office
    Posts
    6

    How to assign each account name with one bucket ?

    I am trying to classify which account belongs to which bucket (see groupings in the same sheet). Any help is appreciated.
    Attached Files Attached Files
    Last edited by Annejose20; 04-01-2022 at 09:09 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2508 (Windows 11 Home 24H2 64-bit)
    Posts
    91,948

    Re: How to assign each account name with one bucket ?

    Welcome to the forum.

    Where is your IF statmement? What is the logic?

    Please post the workbook again with your expected results for the data sample entered manually. What is obvious to you certainly isn't to me.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-01-2022
    Location
    Dublin, Ireland
    MS-Off Ver
    365 Office
    Posts
    6

    Re: How to assign each account name with one bucket ?

    My expected result is -

    Account Name Group
    ABC Inc Group 2
    SOI Ltd Group 2

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2508 (Windows 11 Home 24H2 64-bit)
    Posts
    91,948

    Re: How to assign each account name with one bucket ?

    Where is the updated workbook I asked for?

    For those two I'd have expected this:

    ABC Inc Group 1
    SOI Ltd Group 4

    So, once again, what's the logic???
    Last edited by AliGW; 04-01-2022 at 09:58 AM.

  5. #5
    Registered User
    Join Date
    04-01-2022
    Location
    Dublin, Ireland
    MS-Off Ver
    365 Office
    Posts
    6

    Re: How to assign each account name with one bucket ?

    Not sure what you are asking for ?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2508 (Windows 11 Home 24H2 64-bit)
    Posts
    91,948

    Re: How to assign each account name with one bucket ?

    I would like TWO things from you, please:

    1. An UPDATED workbook with ALL expected results for the small sample dataset inserted.
    2. An EXPLANATION of the logic you want to use to assign companies to buckets, because I cannot see how the two examples you have given fit the groups table provided in the current workbook.

    Thanks.
    Last edited by AliGW; 04-01-2022 at 10:10 AM. Reason: Typo fixed.

  7. #7
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: How to assign each account name with one bucket ?

    I get ABC Inc being Group 2, as it has Bamboo HR and Deel. I don't get why SOI Ltd would not be Group 4, as it only has Connecteam (presuming the ones that say Coonecteam are a typo).

    With a list of unique account names starting in F2 (populate using =UNIQUE($A$2:$A$26) for example), I think you want either this:

    =IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26="Bamboo HR"),1,0))>0,IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26="Deel"),1,0))>0,IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26="UKG Ready"),1,0))>0,"Group 3","Group 2"),"Group 1"),IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26="Connecteam"),1,0))>0,"Group 4","Other"))

    or this:

    =IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26="Bamboo HR"),1,0))>0,IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26="Deel"),1,0))>0,IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26="UKG Ready"),1,0))>0,"Group 3","Group 2"),IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26<>"Bamboo HR"),1,0))=0,"Group 1","Other")),IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26="Connecteam"),1,0))>0,IF(SUM(IF(($A$2:$A$26=F2)*($B$2:$B$26="Connecteam"),1,0))=0,"Group 4","Other")))

    The difference between the two is that the second one includes for the ones that say "only", a test that there are no other subscriptions. This causes a number of those to become "Other", as they have e.g. Sage HR as well as Bamboo or Connecteam. The first one effectively ignores anything which is not Bamboo, Deel, UKG Ready, or Connecteam.

    As Ali said, this could use some clearer explanation of what you want. Also I expect you want to scale this so hard-coding the names is not ideal. But I'm not going to put in the work to do a more complete solution when I'm not even certain what you need.

  8. #8
    Registered User
    Join Date
    04-01-2022
    Location
    Dublin, Ireland
    MS-Off Ver
    365 Office
    Posts
    6

    Re: How to assign each account name with one bucket ?

    Hope this makes sense
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: How to assign each account name with one bucket ?

    I think ABC Inc should be 2 and not 1. Otherwise this gives your expected results:

    =IF(SUM(IF((Account!$A$2:$A$26=B2)*(Account!$B$2:$B$26="Bamboo HR"),1,0))>0,IF(SUM(IF((Account!$A$2:$A$26=B2)*(Account!$B$2:$B$26="Deel"),1,0))>0,IF(SUM(IF((Account!$A$2:$A$26=B2)*(Account!$B$2:$B$26="UKG Ready"),1,0))>0,"Group 3","Group 2"),IF(SUM(IF((Account!$A$2:$A$26=B2)*(Account!$B$2:$B$26<>"Bamboo HR"),1,0))=0,"Group 1","N/A")),IF(SUM(IF((Account!$A$2:$A$26=B2)*(Account!$B$2:$B$26="Connecteam"),1,0))>0,IF(SUM(IF((Account!$A$2:$A$26=B2)*(Account!$B$2:$B$26<>"Connecteam"),1,0))=0,"Group 4","N/A")))

    I noticed a small error in the version I posted before - the last clause was ="Connecteam" when it should have been <>"Connecteam"

    Edit - typo

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2508 (Windows 11 Home 24H2 64-bit)
    Posts
    91,948

    Re: How to assign each account name with one bucket ?

    My logic is to use an if statement to assign each account with the groups I have categorised it into
    The logic I wanted to understand was HOW you were deciding on the categories. It looks like Nick has managed to work it out, but if you had explained this right at the start, then you'd have had a solution much sooner.

  11. #11
    Registered User
    Join Date
    04-01-2022
    Location
    Dublin, Ireland
    MS-Off Ver
    365 Office
    Posts
    6

    Re: How to assign each account name with one bucket ?

    Thanks a lot Nick, Cheers!

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2508 (Windows 11 Home 24H2 64-bit)
    Posts
    91,948

    Re: How to assign each account name with one bucket ?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  13. #13
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    210

    Re: How to assign each account name with one bucket ?

    Hi to both!

    Another option could be:
    PHP Code: 
    =XLOOKUP(TEXTJOIN(", ",,SORT(FILTER(B$2:B$25,A$2:A$25=A2))),N$2:N$5,M$2:M$5,"N/A"
    Check file with the solution. Blessings!
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    04-01-2022
    Location
    Dublin, Ireland
    MS-Off Ver
    365 Office
    Posts
    6

    Re: How to assign each account name with one bucket ?

    Hi John, thanks for the solution, but it returns everything as N/A

+ 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: 1
    Last Post: 04-29-2021, 09:35 PM
  2. Assign Bucket of Values to Groups by Rank
    By cimanaxe in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-28-2017, 12:50 PM
  3. [SOLVED] Best way to assign a "Bucket" to a "file number" based on data from row
    By BG1983 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-27-2016, 11:23 PM
  4. Replies: 0
    Last Post: 03-14-2015, 04:44 PM
  5. IF Statement that will assign account types based on "account number"
    By aladdin16 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-08-2014, 05:04 PM
  6. Replies: 1
    Last Post: 09-07-2012, 12:00 PM
  7. Replies: 9
    Last Post: 03-12-2012, 05:30 AM

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