+ Reply to Thread
Results 1 to 7 of 7

Dividing up records into multiple spreadsheets based on pivot table counts

  1. #1
    Registered User
    Join Date
    12-28-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    3

    Dividing up records into multiple spreadsheets based on pivot table counts

    I have a spreadsheet (around 200k rows) of addresses. The spreadsheet is sorted by ZIP code.

    I need a way for excel to think "there are 5,436 records in the first zip code (let's call it 90210), user wants to break the records with zip code 90210 into 30 separate sheets, meaning the first 181 (rounded down) names in 90210 will go on SHEET 1, the second 181 names in 90210 will go on SHEET 2, and so on until SHEET 30 is reached. Sheet 30 would have the remaining names (considering rounding) so it would likely be larger.

    Then, excel would need to move to the next ZIP code (let's call it 90211 - with 2,500 records) and do the same thing, adding those ZIP codes evenly to the sheets outlined above.

    I know this is somewhat complicated however I've learned that close to everything is possible in excel - any ideas? Any help is appreciated!

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,324

    Re: Dividing up records into multiple spreadsheets based on pivot table counts

    Why do you want to change 1 sheet with 200.000 records in 1100 sheets with each 180 records?
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dividing up records into multiple spreadsheets based on pivot table counts

    Is there anything "special" about the first 181 or could any 181 of the 5436 be chosen as long as there were 181 chosen for each worksheet?

    The reason one would actually break up a database of zip codes escapes me. What is the purpose this is being put to?
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    12-28-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    3

    Re: Dividing up records into multiple spreadsheets based on pivot table counts

    No - nothing special about the first 181 records. It can be 181 records at random within that first zip code.

    The spreadsheet will have 200,000 lines (approximately). It will have 40 different zip codes. Each zip code will have a different number of records. We are creating mailing lists - the lists need to be broken up evenly so an even portion of each zip code is mailed throughout the year (used 30 weeks as an example).

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dividing up records into multiple spreadsheets based on pivot table counts

    Something "quick and dirty" though probably accurate enough is to insert a column and enter this formula next to the starting record and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This will result in a repeating range of values from 0 to 29 the full length of your data. You can then use these values to filter your data for a mail merge without having 30 worksheets. The results of a filter could also be copied to a new worksheet if necessary by selecting the range of the filtered records by going to the Home tab, Find and Select, Special, Visible Cells Only, OK. Click, Copy then on a new worksheet click paste and all the filtered records will be pasted onto the new worksheet. This will keep the size of your workbook to a minimum and is quick and easy to do. The records can even be filtered in Word if that is what you are using to produce the mail out.

    I enclose a small sample that you can play with to get the idea.
    Attached Files Attached Files
    Last edited by newdoverman; 12-28-2015 at 05:44 PM.

  6. #6
    Registered User
    Join Date
    12-28-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    3

    Re: Dividing up records into multiple spreadsheets based on pivot table counts

    Wow - simple yet effective. Thank you! This works well!

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Dividing up records into multiple spreadsheets based on pivot table counts

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

+ 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] Calculating (dividing)fields already within a pivot table
    By JackXcel in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-29-2015, 02:56 AM
  2. Please help! How to tell which counts are the same in pivot table
    By dukepoco224 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-11-2015, 01:59 PM
  3. Replies: 3
    Last Post: 07-28-2014, 03:48 AM
  4. Replies: 2
    Last Post: 05-08-2013, 04:56 PM
  5. Replies: 0
    Last Post: 07-19-2012, 01:43 PM
  6. Pivot Table - Count Multiple data/records as one (unic)
    By BigDeafLx in forum Excel General
    Replies: 2
    Last Post: 04-24-2012, 10:43 AM
  7. Pivot table - SUM of COUNTS?
    By nick_danger in forum Excel General
    Replies: 1
    Last Post: 03-10-2008, 11:43 PM

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