+ Reply to Thread
Results 1 to 9 of 9

VBA for combined rows with similar text and sum

  1. #1
    Registered User
    Join Date
    06-01-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    12

    VBA for combined rows with similar text and sum

    Hello experts. I need a vba that combined the customers’ name in Column F and sum the amount in Column N and P. I know it’s quite complicated and here I am having hard time to search for the answer. Please help me. Here’s my sample:
    Sample A.jpg
    And I want with these results:
    Sample B.jpg
    Thank you in advance

  2. #2
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: VBA for combined rows with similar text and sum

    Try this macro.
    Please Login or Register  to view this content.
    Last edited by abduljaleel.mca; 07-28-2016 at 07:01 AM.

  3. #3
    Registered User
    Join Date
    06-01-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: VBA for combined rows with similar text and sum

    I'll try it later I'm on field

  4. #4
    Registered User
    Join Date
    06-01-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: VBA for combined rows with similar text and sum

    Hi.
    I got an error that says Run time error '6'.
    and the highlighted was focus on this line ...

    sum2 = sum2 + Cells(i, 16) + Cells(i + 1, 16)

  5. #5
    Registered User
    Join Date
    06-01-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: VBA for combined rows with similar text and sum

    I forgot to mention that I have 2400 rows and the last row contains the sum of column P.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: VBA for combined rows with similar text and sum

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  7. #7
    Registered User
    Join Date
    06-01-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: VBA for combined rows with similar text and sum

    I am attaching the sample workbook
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: VBA for combined rows with similar text and sum

    Try
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-01-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    12

    [SOLVED] VBA for combined rows with similar text and sum

    Thank you very much jindon! What a relief!

+ 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] Combined text and date
    By nagesh.tvsr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-07-2015, 02:17 AM
  2. [SOLVED] SUMIF with combined rows
    By slacknoise in forum Excel General
    Replies: 1
    Last Post: 06-19-2014, 12:38 PM
  3. Combined vlookup and if contains text within text function
    By mika6177 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-10-2014, 07:20 PM
  4. Replies: 1
    Last Post: 05-10-2012, 11:33 AM
  5. if or vlookup help (combined columns or rows in one)
    By NV32 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-03-2009, 06:55 AM
  6. Text and formula combined?
    By brendan76 in forum Excel General
    Replies: 2
    Last Post: 02-12-2008, 06:13 AM
  7. use combined text to call a Name
    By Hammer_757 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-03-2006, 01:20 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