+ Reply to Thread
Results 1 to 17 of 17

Combine data in 2 rows into 1 single row

  1. #1
    Registered User
    Join Date
    09-28-2022
    Location
    Perth
    MS-Off Ver
    O365
    Posts
    29

    Combine data in 2 rows into 1 single row

    Hi experts

    Hopefully an easy fix for you.

    I have cricket data. Each game data is available is 2 rows (1 row per team). I want both the teams data in 1 row, as per the Output tab.

    If you have any questions, please message

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    05-03-2021
    Location
    Nashville
    MS-Off Ver
    MS Office 365
    Posts
    184

    Re: Combine data in 2 rows into 1 single row

    I have several questions.
    Is this a pedigree chart of sorts?
    meaning row 2 and row 3 played each other
    row 4 and row 5 played each other
    row 6 and row 7.... etc etc?
    and it will never be row2 playing row 6 for example. Odd Rows always play Even Rows (Odd plays the even below them and Even always plays the Odd above them)
    Pictured is the grouping I'm talking about.

    also, Merged Cells are difficult to work with, I recommend breaking away from that if possible.
    Attached Images Attached Images

  3. #3
    Valued Forum Contributor
    Join Date
    11-29-2022
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    430

    Re: Combine data in 2 rows into 1 single row

    On Output sheet, cell A3, enter this and copy down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    On Output sheet, cell B3, enter this and copy to the right and down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-28-2022
    Location
    Perth
    MS-Off Ver
    O365
    Posts
    29

    Re: Combine data in 2 rows into 1 single row

    yes, row 2 and 3 played against each other and so on....

    yes, you are correct --> (Odd plays the even below them and Even always plays the Odd above them) - you can use the date as a guide as a well - only 1 match played per day

    Please go ahead with your idea of breaking the merged cell

  5. #5
    Registered User
    Join Date
    09-28-2022
    Location
    Perth
    MS-Off Ver
    O365
    Posts
    29

    Re: Combine data in 2 rows into 1 single row

    Hi

    I got a similar problem with 4 rows need to be combined a 1 row

    Could you please look into this?

    I have also posted this as a separate thread.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: Combine data in 2 rows into 1 single row

    2-row merge

    Everything in 1 go, please try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: Combine data in 2 rows into 1 single row

    4-row merge

    Everything in 1 go, please try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: Combine data in 2 rows into 1 single row

    Glad to have helped, thanks for the rep .

  9. #9
    Forum Contributor
    Join Date
    05-03-2021
    Location
    Nashville
    MS-Off Ver
    MS Office 365
    Posts
    184

    Re: Combine data in 2 rows into 1 single row

    Quote Originally Posted by idealist87 View Post
    yes, row 2 and 3 played against each other and so on....

    yes, you are correct --> (Odd plays the even below them and Even always plays the Odd above them) - you can use the date as a guide as a well - only 1 match played per day

    Please go ahead with your idea of breaking the merged cell
    Instead of a merged cell, "Center Across Section" the two cells.
    Center Across Section only works for a single row and doesn't work for columns

    Highlight the cells that you would merge, though instead of clicking "merge cells" right click and choose "format Cells..."

    Click the Alignment Tab and in the "horizontal" drop down select "Center Across Section"

    Then click OK.

    This is best practice as sometimes merged cells can mess with formulas, it can be done, but this way you don't have to worry about it.

    Hope this helps.
    Attached Images Attached Images

  10. #10
    Registered User
    Join Date
    09-28-2022
    Location
    Perth
    MS-Off Ver
    O365
    Posts
    29

    Re: Combine data in 2 rows into 1 single row

    Quote Originally Posted by HansDouwe View Post
    4-row merge

    Everything in 1 go, please try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    HI

    The total data I got is 7000 rows. The formula is not showing all the data. It stops with 5 rows as per example data.
    How to fix this?

  11. #11
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: Combine data in 2 rows into 1 single row

    I suspect that after row 20 or so there are no more values in column A.

    You have 3 options:

    Put values in column A

    OR try ...B2:P9999... and decrease these numbers by 1: {2,9,9,10,10,14,14,12,12,13,13,12,12,13,13}

    OR replacee INDEX(t,,1) by INDEX(t,,2)

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Combine data in 2 rows into 1 single row

    Please check attached files to see if this is what you want to achieve

  13. #13
    Registered User
    Join Date
    09-28-2022
    Location
    Perth
    MS-Off Ver
    O365
    Posts
    29

    Re: Combine data in 2 rows into 1 single row

    Quote Originally Posted by sandy666 View Post
    Please check attached files to see if this is what you want to achieve

    Yes,it's correct

    But when I add all my data , 7000 rows into Data tab, how should I update the output tab?

  14. #14
    Registered User
    Join Date
    09-28-2022
    Location
    Perth
    MS-Off Ver
    O365
    Posts
    29

    Re: Combine data in 2 rows into 1 single row

    Quote Originally Posted by HansDouwe View Post
    I suspect that after row 20 or so there are no more values in column A.

    You have 3 options:

    Put values in column A

    OR try ...B2:P9999... and decrease these numbers by 1: {2,9,9,10,10,14,14,12,12,13,13,12,12,13,13}

    OR replacee INDEX(t,,1) by INDEX(t,,2)

    No luck mate.
    Attached Files Attached Files

  15. #15
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Combine data in 2 rows into 1 single row

    Quote Originally Posted by idealist87 View Post
    Yes,it's correct

    But when I add all my data , 7000 rows into Data tab, how should I update the output tab?
    just refresh green table (right click on this table and choose Refresh or Alt+F5)
    Last edited by sandy666; 12-24-2022 at 08:45 AM.

  16. #16
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: Combine data in 2 rows into 1 single row

    The array-formula was not correct confirmed with CTRL+SHIFT+ENTER

    Please delete all green cells and add the formula again to A3 and confirm the formula with CTRL+SHIFT+ENTER
    Attached Files Attached Files

  17. #17
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Combine data in 2 rows into 1 single row

    my pleasure and thanks for the rep
    have a nice day

+ 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. Combine data in 2 rows into 1 single row
    By idealist87 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-31-2022, 05:52 AM
  2. Combine data in 2 rows into 1 single row
    By idealist87 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-13-2022, 04:53 AM
  3. [SOLVED] How to combine data from multiple rows into a single row / multiple columns
    By Iain170 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-17-2020, 06:56 AM
  4. [SOLVED] Formula to Combine Multiple Rows into a single row of data
    By sherylt13 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-17-2017, 10:12 PM
  5. Combine Data in Multiple Rows into Single Row
    By koonwei605 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-18-2014, 07:43 AM
  6. Replies: 6
    Last Post: 02-19-2014, 10:25 AM
  7. combine nmultiple rows of data to single
    By supert8ch in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2013, 08:49 AM

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