+ Reply to Thread
Results 1 to 3 of 3

Merge irregular rows data into 1 column and find the next row based on another column

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Merge irregular rows data into 1 column and find the next row based on another column

    We had downloaded a file and had exported it into EXCEL.

    We need to merge the data in different rows for sorting and calculation purpose.

    The cell to identify each set of data is in Column H (Nature of Claim). Some set of data have 10 rows and some have 7 rows.

    I had attached a file with the desired result in another worksheet. After merging the rows, I need to display the merge data as a separate line (wrap text) as if it's in different rows but actually data are in 1 cell.

    Need to find out the amount by identifying the wordings "SIN" and "SGD" OR just a "-" in column E.

    Original file have thousand of rows and we are unable to sort by date and also to abstract the amount out.

    Hoped someone can help.
    Attached Files Attached Files
    Last edited by ec4excel; 05-25-2023 at 11:20 PM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,824

    Re: Merge irregular rows data into 1 column and find the next row based on another column

    This is a formula based proposal with a lot of helper columns:
    1. Columns I:O are populated using: =IF(AND($B13<>"",OR($B12="",ROW()=13)),B13,IF(B13<>"",I12&B13,I12))
    2. Columns P is populated using: =AND(B13="",B14<>"")
    The results:
    1. Columns R:X are populated using: =IFERROR(INDEX(I$13:I$86,AGGREGATE(15,6,(ROW(I$13:I$86)-ROW(I$12))/($P$13:$P$86=TRUE),ROWS(R$13:R13))),"")
    2. Column Y (the amount) is populated using: =IF(R13="","",SUMIFS(E$13:E$86,I$13:I$86,R13))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Merge irregular rows data into 1 column and find the next row based on another column

    ec4excel... Please confirm the Excel product you are using and update your profile, if required.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

+ 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. Averaging rows by irregular values in Column X
    By MaverickBlack in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-05-2014, 12:09 AM
  2. Replies: 4
    Last Post: 09-15-2014, 06:01 AM
  3. [SOLVED] Remove rows based on duplicates in certain columns, and merge data from another column
    By yanagi600 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-02-2013, 04:17 PM
  4. Replies: 1
    Last Post: 10-22-2012, 11:09 PM
  5. need to merge cells in column B based on data in column A
    By saintdesy in forum Excel General
    Replies: 2
    Last Post: 08-15-2012, 05:50 AM
  6. Converting single column into multiple rows with irregular data
    By longhornpete in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-18-2012, 10:27 AM
  7. Replies: 2
    Last Post: 03-16-2009, 12:26 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