1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Count rows and then divide into separate worksheets

Discussion in 'Business Applications' started by skybuck, Jan 7, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    Hi I need some help.
    I have a spreadsheet that i get every day. I need to divide it between a certain number of people each day. So I need a macro to ask me how many people to divide the spreadsheet into separate tabs and then count the rows and paste the data into each spreadsheet. The data is dynamic and the number of people is dynamic. So, if my data is 501 rows, i have 5 people to give the data to, the data will be pasted into 5 separate tabs at 100 for 4 people and 101 rows for the 5th person. thank you for your help.
     
  2. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Please post a sample workbook showing your data layout.

    Regards,
    Rollin
     
  3. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    Thanks for replying. I have attached a sample report and instructions of what i need in Sheet1 and Sheet2 of the workbook. I thought about what i need and changed it a little bit. Instead of separating the rows into separate sheets, add a column to the left and add in names. Thank you.
     

    Attached Files:

  4. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Take a look at my sample workbook. There is a macro called SplitWork that will open a userform with a listbox that will allow you to select the names you would like to use. You can select multiple names in the list by holding the CTRL key while making your selection or you can use the "select all" button to choose all names in the list. Once all the selection(s) have been made you then click the submit button to process them. The list of names that appears in the listbox comes from the worksheet called "Names" so if you want to add additional names all you have to do is go to that sheet and continue with the list in column A.

    Rollin
     

    Attached Files:

  5. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    Awesome -- Thanks so much Rollin - You are the best!
    I have another project -- may I send it to you?

    Thank You
    Skybuck
     
  6. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Please mark this thread as solved and start a new thread for your other project. One more thing, welcome to the TSG Boards!

    Rollin
     
  7. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    Will do! thanks again!
     
  8. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    Ok - here is what i want to do now with this macro...i would like to be able to match up the names with the makes. using the same concept of dividing the work between the names and makes...so i may want to split the make "Chevy" between Scott & Kim, give Dawn all the honda or Dawn, Doug, and Bob the honda. or give Dawn the honda, and Bob the ford, and split the rest of the makes between Doug, Kim & Scott....let me know if you understand...this is a little more interactive and in debth. I have found that some of the folks work better with certain makes than others so i would like to give them their makes and then be able to divide the rest of the makes to either 1 or more folks. Thank you.
     
  9. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Hmmm.....My head is already starting to hurt thinking about how this should be coded. I'll have to give it some thought to see if I can come up with some ideas.

    Rollin
     
  10. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    Haha! I know it's a tough one! It would be great though you've got to admit!
    Thanks!
     
  11. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    I had another thought....there are going to be hundreds of rows of makes and I don't know which makes are in the spreadsheet, it is not always the same, so i was wondering if the macro would be able to display the makes that are in the spreadsheet in the form so that when it pops up i can match up the names to the makes that are actually in that days list....
     
  12. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Yes that's easy. I'll put something together when I have some free time.

    Rollin
     
  13. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    Ok thanks! That would be great!
    Again, I appreciate your knowledge and time!
    Sky
     
  14. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    Rollin - just so you know, the "make" is in the B column for this project...i figure I'd tell you now rather than me trying to change it and screwing it up like last one!
    Thanks!
     
  15. skybuck

    skybuck Thread Starter

    Joined:
    Jan 7, 2011
    Messages:
    28
    Hi Rollin,

    Just checking in to see if you came up with anything on this...
    thanks
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/973324

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice