+ Reply to Thread
Results 1 to 7 of 7

Move from multiple rows to one row (two sheets)

  1. #1
    Registered User
    Join Date
    06-29-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Move from multiple rows to one row (two sheets)

    Move to one line.xls

    Hi all,

    I'm looking for piece of code that will help me consolidate customers into one line where some information is duplicated.

    The attached shows you what I'm looking to do.

    Firstly I pull a report that lists different invoices, so for customer A we have 4 different invoices. Same for customer B. (see the first tab attached)

    I want to pull this so that customer A is on one line with invoices (and some other details) posted on the same line so 4 invoices onto the one line. (See Tab two) The report it's posting into will remain the same (so the heads and cells will never change). we can have up to 10 invoices per customer and the headers will reflect this in the master.

    I can't get my head round the best way to approch this.

    Can anyone help me out on it?

    Thanks
    Carl
    Last edited by Kidcarlosuk; 11-23-2012 at 12:27 PM. Reason: Upload file

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Move from multiple rows to one row (two sheets)

    Carl,
    It is not clear to me which columns/rows you wish to merge, or delete. Try this code and let me know if this works for you
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-29-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Move from multiple rows to one row (two sheets)

    Hi Ab33.

    Thanks for your time on this, and sorry for not making myself clearer.

    The result of your code is close but what I'm looking for once the code has run is to see Column L, M, N, O to include the details of the second invoices.

    So row 2, 3, 4, 5 are all for customer A. I want to consolidate this to one row in a new sheet (like your code) where (using your results sheet) H2:K2 equals the same invoices details you've got, Then L2:02 will equal the invoices details from the next row down (so originally from Row 3). Then row P2:S2 will have the invoices details from row 4 continuing until there is a new customer (B). which woudl then start the process again but on the next row down of the result sheet.

    the tab "working sheet" gives the end result of what I would like it to look like once the code has run.

    Thanks for your help and I hope this helps clear it up. (it's quite difficult to explain in text)

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Move from multiple rows to one row (two sheets)

    Carl,

    (it's quite difficult to explain in text)

    Yes, I understand,but would be easier if you could attach sample which shows your desired result. So, in your working sheet you could include form and layout of your desired result

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Move from multiple rows to one row (two sheets)

    Sorry Carl! Ignore my last post(#4). I can see you have attached the desired result.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Move from multiple rows to one row (two sheets)

    Please see modified
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-29-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Move from multiple rows to one row (two sheets)

    Thank you very much..

    that's brilliant!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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