+ Reply to Thread
Results 1 to 5 of 5

combining two sets of rows

Hybrid View

  1. #1
    Registered User
    Join Date
    04-21-2015
    Location
    Brazil
    MS-Off Ver
    2003
    Posts
    5

    combining two sets of rows

    Hi everyone!
    I'd like to combine/distribute 2 sets of rows. I mean, as a result we have to see all rows of 1st set combined with all rows of 2nd.
    In columns B and C are the 1st set and columns F to H the 2nd. The result, columns K to O.
    Both sets can be increased. And I'd like to use functions and/or formulas.
    Please, see the attachment file.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,840

    Re: combining two sets of rows

    See attached file. I've used these formulae in the cells stated:

    K2: =IF(ROWS($1:1)>COUNT(B:B)*COUNT(F:F),"",INDEX(B:B,INT((ROWS($1:1)-1)/COUNT($F:$F))+2))
    L2: =IF(K2="","",INDEX(C:C,INT((ROWS($1:1)-1)/COUNT($F:$F))+2))
    M2: =IF(ROWS($1:1)>COUNT(B:B)*COUNT(F:F),"",INDEX(F:F,MOD(ROWS($1:1)-1,COUNT($F:$F))+2))
    N2: =IF(M2="","",INDEX(G:G,MOD(ROWS($1:1)-1,COUNT($F:$F))+2))
    O2: =IF(M2="","",INDEX(H:H,MOD(ROWS($1:1)-1,COUNT($F:$F))+2))

    These are then copied down further than you need them to accommodate changes in the tables (I've copied to row 25).

    Hope this helps.

    Pete
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-21-2015
    Location
    Brazil
    MS-Off Ver
    2003
    Posts
    5

    Re: combining two sets of rows

    Thanks Pete!
    It's working fine.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,840

    Re: combining two sets of rows

    You're welcome - thanks for the rep.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Pete

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,638

    Re: combining two sets of rows

    Try this
    In Q2, then dragged to R13
    =INDEX($B$2:$C$4,INT((ROW($K2)-ROW($K$2))/ROWS($F$2:$F$5))+1,COLUMN(K$2)-COLUMN($K$2)+1)
    In S2, then dragged to U13
    =INDEX($F$2:$H$5,MOD((ROW($K2)-ROW($K$2)),ROWS($F$2:$H$5))+1,COLUMN(S$2)-COLUMN($S$2)+1)
    Attached Files Attached Files

+ 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. Combining large sets of data
    By cab0317 in forum Excel General
    Replies: 9
    Last Post: 10-02-2013, 12:50 PM
  2. Combining sets of data into a pie chart
    By WVAviator in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-17-2012, 07:43 PM
  3. [SOLVED] Combining two unlike sets of data
    By smls in forum Excel General
    Replies: 4
    Last Post: 07-09-2012, 11:22 AM
  4. Combining two data sets
    By Teacher in forum Excel General
    Replies: 10
    Last Post: 09-11-2011, 12:11 PM
  5. Combining 2 sets of code
    By dalewms2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2011, 07:16 PM
  6. Excel 2007 : Combining two sets of complex dates
    By Cerenity in forum Excel General
    Replies: 4
    Last Post: 03-31-2010, 11:43 AM
  7. combining two data sets
    By pani_hcu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2009, 12:43 PM
  8. Combining two sets of data
    By chrmlr2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-28-2009, 09:41 PM

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