1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

    Yours,
    Chandoo
  2. Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  3. When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Divide equally the number

Discussion in 'VBA Macros' started by Akbarmahfuzalam, May 16, 2018.

  1. Akbarmahfuzalam

    Akbarmahfuzalam New Member

    Messages:
    4
    “I have 100 concept where each have their own number. I’ve been trying to figure out how I can divide these concepts into 50 even teammate – or as close as possible.” Any help with regards to VBA.

    A B C
    Concept Pages Name
    Red 0
    Green 6
    Blue 45
    Life 46
    Camera 48
    church 48
    Alight 48
    Alloy 49
    allied health 51
    amano 51
    altezza 53
    amala paul 53

    Attached Files:

  2. AlanSidman

    AlanSidman Active Member

    Messages:
    319
    Your explanation is not clear. Please explain in detail with examples of what you wish to achieve.
  3. Akbarmahfuzalam

    Akbarmahfuzalam New Member

    Messages:
    4
    I have sheet1 wherein, Column A and B is filled with data- In Column B i have numbers which is like 201,201,450,1001,2540,5456,...etc and it goes till 500 Rows.
    Now i want at Column C to automatically assign the name of a person equally in number as Mr. A as 3000 Mr B 3000, Mr C 3000 and so on.

    On sheet2 i have the dataset of Name at Column A.

    Sheet1
    upload_2018-5-17_7-33-48.png

    Sheet2
    upload_2018-5-17_7-34-50.png
  4. Ashhu

    Ashhu Active Member

    Messages:
    210
    Check column C in attached

    Attached Files:

  5. Akbarmahfuzalam

    Akbarmahfuzalam New Member

    Messages:
    4
    Thanks a ton Ashhu,

    I need the VBA code as the data will change everyday.
    In sheet1 as well as in sheet2.
    I need it dynamically as per user input .
    What range i want to and for which name i want to distribute.
    And what amount of number i want to equally distribute.
    Say i want to distribute only 450-600 pages per person.

    How to go about that.



    Thanks,
    Akbar Alam

    Attached Files:

  6. Ashhu

    Ashhu Active Member

    Messages:
    210
    if range in sheet 2 changes, formula still works. All you need to change is range in Name manager. Else make sheet 2 names range as table, so it will automatically consider the range whenever you can add new name
  7. Akbarmahfuzalam

    Akbarmahfuzalam New Member

    Messages:
    4
    But number is not equally distributed among the name. It is distributed among the name. If you refer my sheet pivot its marked as red as not equally divided.
  8. Ashhu

    Ashhu Active Member

    Messages:
    210
    i think i misunderstood the Page distribution in first place, apologies.
    i may not be able to help with VB scripting, i think i have to pass this for other experts.

Share This Page