+ Reply to Thread
Results 1 to 4 of 4

how to append data to rows based on a condition

  1. #1
    Registered User
    Join Date
    07-07-2018
    Location
    https://t.me/pump_upp
    MS-Off Ver
    2016
    Posts
    15

    Question how to append data to rows based on a condition

    Hi,

    I am working on a huge dataset containing data of thousands of IDs in which I have to append data from within the rows as shown in attached image. aaa.png

    I want such a VBA program or any method that will look for the most recent date for an ID such as in the given example, we have ID '111'. Now for '111' there are three dates. The program should move to the row with most recent date which is 04-Dec and then append the data from the previous dates for the same ID at the end of this. There can be instances more or less than 3 for an ID.
    Attached Files Attached Files
    Last edited by zt4096; 12-05-2019 at 02:51 PM.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: how to append data to rows based on a condition

    Move your table to start in A1. This code assumes that the table is completely filled - no blanks in any cell. Note the optional line at the bottom - un-comment it if you want to remove the extra rows.

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    07-07-2018
    Location
    https://t.me/pump_upp
    MS-Off Ver
    2016
    Posts
    15

    Re: how to append data to rows based on a condition

    Mr Bernie Thank you very much for solving my problem.

    One more thing I want to know is that if I want to copy only the date and feature1 then what would change in the code?

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: how to append data to rows based on a condition

    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

+ 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] Append column data as rows
    By shravani541 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2016, 08:57 AM
  2. Copying data from column heads to the rows based on a condition
    By mohan308 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-13-2015, 01:37 PM
  3. Insert data rows based on a condition for measured data
    By JosipK in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-10-2015, 02:09 PM
  4. [SOLVED] Insert Row based on Condition and add data in the newly created rows
    By Omariss in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-16-2013, 04:27 AM
  5. Automatically append data in rows
    By shashimurnetti in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2013, 04:59 AM
  6. Replies: 2
    Last Post: 04-13-2010, 04:00 AM
  7. Replies: 3
    Last Post: 02-05-2008, 11:13 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