+ Reply to Thread
Results 1 to 7 of 7

VBA to copy multiple rows data into singlet row into multiple columns

  1. #1
    Forum Contributor
    Join Date
    09-13-2013
    Location
    Saudi Arabia
    MS-Off Ver
    2010, 2013
    Posts
    192

    Cool VBA to copy multiple rows data into singlet row into multiple columns

    Hello Again,

    I am looking for a help on copy columns data to multiple columns if the value is duplicate.

    Explanation:
    Look for a value and copy columns I, J & K data into a first row of the value. If the value found repeating and keep coly a above mentioned columns data in the first row as shown in the sample.

    Copy of manual workout is attached.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: VBA to copy multiple rows data into singlet row into multiple columns

    I have a quick solution with what I believe is a better presentation of the final product. I've attached it and made a Pivot Table of the data. It groups the like BATCH NUMBERS so you can more easily see the 'like'/duplicates. I had to add another column (sno) otherwise it may have attempted to combine (sum) the data. Pivot Tables are great time savers.

    Please update me if this is a good solution ~ add reputation if this has helped you! Thank you
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    09-13-2013
    Location
    Saudi Arabia
    MS-Off Ver
    2010, 2013
    Posts
    192

    Re: VBA to copy multiple rows data into singlet row into multiple columns

    Thanks Queusef,

    But it is total different output which I have attached.

    I can do this also but we need to have in first records in single row with multiple column.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,428

    Re: VBA to copy multiple rows data into singlet row into multiple columns

    Building on queuesef's proposal.
    1. Rearrange the pivot table by putting Sno in the columns field
    2. Use the following to copy the Batch numbers: =A6
    3. Use the following to produce a list of Dates, Pay amounts and Check amounts: =IFERROR(INDEX($B6:$HL6,AGGREGATE(15,6,(COLUMN($B6:$HL6)-COLUMN($A6))/($B6:$HL6<>""),COLUMNS($A$1:A$1))),"")
    4. Use the following conditional formatting to display the dates: =LEFT(B$19,4)="Date"
    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.

  5. #5
    Forum Contributor
    Join Date
    09-13-2013
    Location
    Saudi Arabia
    MS-Off Ver
    2010, 2013
    Posts
    192

    Re: VBA to copy multiple rows data into singlet row into multiple columns

    Thanks JeteMc,

    Actually I am looking for macros as I am having more than 600K rows every day and pivot table cannot make for this heavy data. if you can help me please.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,428

    Re: VBA to copy multiple rows data into singlet row into multiple columns

    I don't know VBA so I can't help in that regard. At least the thread has been bumped up the que a couple of times. You might try bumping it, by making another post, late Sunday or early Monday.

  7. #7
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: VBA to copy multiple rows data into singlet row into multiple columns

    try
    Please Login or Register  to view this content.
    Last edited by nigelog; 02-28-2020 at 01:07 PM.

+ 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] Search multiple columns from Multiple Worksheets and copy rows into a Summary Worksheet
    By kljohn01 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-07-2017, 03:46 PM
  2. [SOLVED] Macro for data present in multiple rows and columns following multiple conditions
    By macrolearnerkk in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-07-2015, 11:20 AM
  3. Replies: 9
    Last Post: 12-15-2013, 10:05 PM
  4. Replies: 4
    Last Post: 03-08-2013, 09:49 AM
  5. Replies: 8
    Last Post: 07-17-2012, 03:54 PM
  6. Multiple ccolums/rows to get data from multiple columns/rows (vlookup)
    By Ramzes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-18-2010, 05:35 AM
  7. Replies: 1
    Last Post: 03-18-2009, 04:18 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