+ Reply to Thread
Results 1 to 8 of 8

How to merge rows that have similar location names

  1. #1
    Forum Contributor
    Join Date
    09-15-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    111

    How to merge rows that have similar location names

    Hi All,

    Please help me with this.

    I have data of location & respective employee names in details sheet starting from row 6 till depends on day to day basis.
    On clicking submit button, it should first sort by locations and then merge all the locations that are similar.
    In short I need the final result as shown in sheet2,
    but note: result should be in displayed details sheet only. That is merging & final output should be in details sheet only.
    I have created Sheet2 just for your reference.

    Kindly provide a macro code for this.
    Attached Files Attached Files

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: How to merge rows that have similar location names

    Try this:-
    NB:- Generally, Merged cells and VB do not tend to go well together !!!!
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Forum Contributor
    Join Date
    09-15-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    111

    Re: How to merge rows that have similar location names

    Hi Mick...
    Your code still has some issues, when I click on submit sold on is getting repeated in sheet2

  4. #4
    Forum Contributor
    Join Date
    09-15-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    111

    Re: How to merge rows that have similar location names

    Hi Mick...
    Your code still has some issues, when I click on submit "sold on" is getting repeated in sheet2 and also repeatative employee names should not be shown. What I mean is in the attached file
    "Justin Miles" is working in same location but his name is listed twice on clicking submit his name should reflect only once and qty, cost values should be summed and displayed in final sheet. I have updated the macro code in excel & attached it for your reference.

    please advise.
    Attached Files Attached Files

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: How to merge rows that have similar location names

    Can you show an example of the "Summed" values :- "Qty" ,"Cost" and "MTD Costs".
    I'm not sure if they should be based on, "Person" or "Location".

  6. #6
    Forum Contributor
    Join Date
    09-15-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    111

    Re: How to merge rows that have similar location names

    Hi,

    The summary I want is as shown in Sheet1.
    So, on clicking submit button output should be as shown in sheet1.

    Please advise
    Attached Files Attached Files
    Last edited by aleanboy; 10-09-2014 at 12:19 PM. Reason: sdsdsd

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to merge rows that have similar location names

    @ aleanboy

    This appears to be a duplicate Thread

    http://www.excelforum.com/excel-prog...ils-sheet.html
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  8. #8
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: How to merge rows that have similar location names

    If not solved !! , Try this:-
    Please Login or Register  to view this content.
    Regards Mick

+ 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. "merge" similar rows in pivot table?
    By rahel.ba in forum Excel General
    Replies: 1
    Last Post: 05-30-2023, 11:03 AM
  2. [SOLVED] Consolidate multiple rows that have similar names into one row in another workbook
    By brgr4u in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-21-2013, 01:19 PM
  3. Replies: 1
    Last Post: 10-22-2012, 11:09 PM
  4. Replies: 4
    Last Post: 07-10-2011, 06:57 PM
  5. [SOLVED] Merge rows with similar data
    By Shailesh Gattewar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-10-2005, 02:06 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