+ Reply to Thread
Results 1 to 10 of 10

Populate data into groups blocks

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Populate data into groups blocks

    Hello everyone

    I have a working file that has two sheets ("INF" and "SP") and the following code populates the data into groups (blocks) >> each block of 40 rows and 4 blocks
    The code print preview each person separately so please have a look at the code and test it first to see the desired output
    Please Login or Register  to view this content.
    So the code depends on the table so as to populate the data

    What I need is to change the input approach : as I have Data sheet with three columns
    One columns for Names
    Second column for Seat
    Third Column for Secret

    ** Attached a sheet named "Data"

    I need to populate the data for each person in the same way or the same output as the attached code did
    Attached Files Attached Files
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Populate data into groups blocks

    To make it clearer I will make the steps of the manual steps I do to get the desired output
    1- Filter the Names in Data sheet by "A" for example
    2- Create new sheet
    3- Copy the filtered data to the new sheet
    4- Delete Column B (the names) and keep only Seat and Secret columns
    5- Copy the first 40 rows (row 1 to 40) to "SP" sheet and paste into A1
    6- Copy the rows (41 to 80) and paste into D1
    7- Copy the rows (81 to 120) and paste into G1
    8- Copy the rows (121 to 160) and paste into J1
    9- Copy the rows (161 to 200) and paste into A41
    And so on ...

    Hope that makes the issue clearer

    This is posted at this link too
    http://www.eileenslounge.com/viewtopic.php?f=30&t=32435

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Populate data into groups blocks

    Hi Yasser...

    The page breaks escape me...My unorthodox method...
    Please Login or Register  to view this content.
    Last edited by sintek; 05-06-2019 at 08:56 AM. Reason: Forgot Headers...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Populate data into groups blocks

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Populate data into groups blocks

    Thank you very much for both of you
    Karedog offered a masterpiece. Thanks a lot for awesome solution

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Populate data into groups blocks

    You are welcome, thanks for marking the thread as solved and rep.points.

    Regards

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Populate data into groups blocks

    Hello my friend
    Sorry again for disturbing you .. I have noticed in the results that the seat numbers are sorted and that is not desired (as I need the same order of data in Data sheet)

    For example: cut the rows from 8 to 13 and insert first to see my point of view
    The expected results for first seat and secret would be 10 & 610
    Attached Files Attached Files

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Populate data into groups blocks

    It is even easier, just comment or delete the bubble sort part :
    Please Login or Register  to view this content.
    I add this routine because on eileenslounge, Hans mentioned to sort the data first on the sheet, but you said the sheet must not be changed at all, so I thought that the final result must be sorted, but the process must be performed in memory, not on the sheet itself.

  9. #9
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Populate data into groups blocks

    Thank you very much for great help my friend
    Forgive me for disturbing you a lot ..

  10. #10
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Populate data into groups blocks

    You are welcome, glad I can help.

+ 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: 26
    Last Post: 01-15-2016, 03:38 AM
  2. [SOLVED] Alternative to INDEX MATCH Array Formula to Populate Teaching Groups?
    By AliGW in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-19-2015, 01:58 PM
  3. Replies: 4
    Last Post: 07-22-2015, 07:13 AM
  4. Replies: 9
    Last Post: 03-03-2014, 02:47 PM
  5. [SOLVED] Grouped Data Blocks editted to Columns of Data based off left cell value?
    By BlazzedTroll in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-10-2013, 03:06 PM
  6. Replies: 1
    Last Post: 07-22-2012, 09:26 AM
  7. Using macros to identify blocks of data and summarise those blocks
    By gophbeav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2012, 04:35 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