+ Reply to Thread
Results 1 to 11 of 11

Distribute ID based on criteria

  1. #1
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Distribute ID based on criteria

    Hi guys!


    I have a workbook that needs to fill the column B (if the column A is populated) with Column C if the column D is "YEs" once i clicked the command button. the distribution should be even. i tried rand() but its not distributively well, so i'm thinking to work it with macro.


    Thanks for your usual help.

    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Distribute ID based on criteria

    What is the logic for the distribution? I cannot follow your explanation nor your presentation in the spreadsheet. Please clarify.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: Distribute ID based on criteria

    Hi alansidman!

    thanks for replying. basically, the idea is that i have set of ID's, and the numbers will be their assignments (where there's a lot of it). but they will be working if they are present(yes or no).

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Distribute ID based on criteria

    And you want the assignment to be randomly assigned? If they are not present, then what should be placed in the column? How many different assignments are there. 13 as represented by the letter "m?"

  5. #5
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: Distribute ID based on criteria

    No, not random, actually still in order but they will be included in the distribution if they are present. if they are not present, they will not be included in the distribution. and btw, the column B is the column that needs to be populated. I put the data in red and that should be the result after i run the macro. Thanks!

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Distribute ID based on criteria

    I don't have a solution for you, but will pass this on to others that may.

    Alan

  7. #7
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: Distribute ID based on criteria

    oks.. thanks anyway,

  8. #8
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: Distribute ID based on criteria

    Anyone? Thank you so much!

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Distribute ID based on criteria

    Look like to establish list of IDs in C column which corresponds to "yes" in D column.

    I try with formular to display the expected results in order to help other helpers to put it an end with macro:

    In B23:

    =IFERROR(INDEX($C$1:$C$14,SMALL(IF($D$2:$D$14="yes",ROW($D$2:$D$14),""),ROW(A22))),B15)

    Confirmed with Ctrl-shift-enter

    Copy up.

    Can anyone give help with macro?
    Quang PT

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Distribute ID based on criteria

    Oops...never mind...misread
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  11. #11
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: Distribute ID based on criteria

    anyone?? how to loop the formula above???

+ 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. [SOLVED] Want to Distribute Data from Sheet A to the other sheets based on Criteria
    By jordan1214 in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 04-13-2013, 09:27 PM
  2. Want to Distribute Data from Sheet A to the other sheets based on Criteria
    By jordan1214 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-12-2013, 08:45 PM
  3. Distribute amt value based on % spread in another table
    By NKRA in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-15-2011, 03:42 PM
  4. Distribute data based on ratios?
    By NicholasJohn16 in forum Excel General
    Replies: 7
    Last Post: 08-01-2009, 12:07 AM
  5. Distribute data amoung agents based on specified criteria
    By mike22183 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2009, 01:20 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