+ Reply to Thread
Results 1 to 4 of 4

Merge Cells with Same Value and plus average

  1. #1
    Registered User
    Join Date
    09-08-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    2010
    Posts
    45

    Merge Cells with Same Value and plus average

    Hello,

    I am trying to achieve the following by VBA:

    This

    A B C D
    1 Name Quantity Cost Cost Per
    2 Dog 1 150 150
    3 Dog 2 300 150
    4 Cat 1 150 150
    5 Cat 1 150 150
    6 Mouse 3 300 100

    To this

    A B C D
    1 Name Quantity Cost Cost Per
    2 Dog 3 450 150
    3 Cat 2 300 150
    4 Mouse 3 300 100

    I am trying to merge the rows that have similar Data on Columns A,B,C and then give the average on D

    I have them sorted by Column A already so the rows would be adjacent.

    Column D contains a formula to find the average of C which makes it a little more complicated.

    Any help would be greatly appreciated,

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Merge Cells with Same Value and plus average

    Maybe :
    Please Login or Register  to view this content.
    Attached Files Attached Files
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Registered User
    Join Date
    09-08-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    2010
    Posts
    45

    Re: Merge Cells with Same Value and plus average

    Excellent Karedog!

    Worked like a charm. Thank you so much!

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Merge Cells with Same Value and plus average

    You are welcome. Thanks for marking the thread as solved and for the rep.point.


    Regards

+ 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. Replies: 2
    Last Post: 01-22-2014, 02:35 PM
  2. [SOLVED] need formula to average cells but if one cell has N/A then dont average and input N/A
    By CityInspector in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2013, 04:16 PM
  3. Replies: 14
    Last Post: 06-14-2013, 09:00 PM
  4. Replies: 10
    Last Post: 04-25-2013, 06:12 PM
  5. The rank of average ranks excluding empty cells but including their average.
    By Terminal45 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-21-2012, 03:44 AM
  6. How to merge 2 graphs into an average graph?
    By CKL in forum Excel General
    Replies: 8
    Last Post: 05-14-2010, 06:06 AM
  7. [SOLVED] average cells, show 0 if nothing to average
    By Kycajun in forum Excel General
    Replies: 8
    Last Post: 06-21-2006, 02:40 PM
  8. MERGE CELLSHow to merge two cells in excel?
    By laure abbass in forum Excel General
    Replies: 1
    Last Post: 11-10-2005, 01:50 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