+ Reply to Thread
Results 1 to 5 of 5

Macro to total values based on vendor criteria, delete rows & continue on

  1. #1
    Registered User
    Join Date
    09-16-2015
    Location
    Fairplay, Colorado
    MS-Off Ver
    10
    Posts
    3

    Question Macro to total values based on vendor criteria, delete rows & continue on

    Good morning everyone
    I'm new to the forums and try to learn macros and VBA.

    I'm currently involved in a project that takes a lot of my time.

    Here is the raw data


    REX OIL CO INC 8,486.79
    REX OIL CO INC 21,998.20
    REX OIL CO INC 63.44
    RUSH MEDIUM DUTY TRUCK C 97.14
    SAFETY-KLEEN SYSTEMS, IN 374.39
    SHIPP CORPORATION NO 2 I 4,778.00
    SHIRLEY SEPTIC PUMPING I 110.00
    SHIRLEY SEPTIC PUMPING I 78.00
    SHIRLEY SEPTIC PUMPING I 110.00
    SILVERHEELS TOWING & REC 120.00
    SOUTH PARK TRUE VALUE IN 37.46
    SOUTH PARK TRUE VALUE IN 3.98
    SOUTH PARK TRUE VALUE IN 38.59
    SOUTH PARK TRUE VALUE IN 5.58
    SOUTH PARK TRUE VALUE IN 63.97
    SOUTH PARK TRUE VALUE IN 58.98
    SOUTH PARK TRUE VALUE IN 13.99

    Question: Is there a macro that would total the amounts for each vendor and then delete the duplicate vendor rows?
    This is the outcome after I do it manually

    REX OIL CO INC 30,548.43
    RUSH MEDIUM DUTY TRUCK C 97.14
    SAFETY-KLEEN SYSTEMS, IN 374.39
    SHIPP CORPORATION NO 2 I 4,778.00
    SHIRLEY SEPTIC PUMPING I 298.00
    SILVERHEELS TOWING & REC 120.00
    SOUTH PARK TRUE VALUE IN 222.55

    Thank you in advance!

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Macro to total values based on vendor criteria, delete rows & continue on

    I used this:

    Please Login or Register  to view this content.
    This assumes the data is in two columns. Does the raw data come out that way, or is it single column only?
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    09-16-2015
    Location
    Fairplay, Colorado
    MS-Off Ver
    10
    Posts
    3

    Re: Macro to total values based on vendor criteria, delete rows & continue on

    Hi Daffodil11

    there are 3 columns

    A is Vendor name
    B is Amount
    C is description of an account (i did not post it here)

    thank you!

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Macro to total values based on vendor criteria, delete rows & continue on

    Another way would be to simply copy A, paste somewhere (f?), Data->Remove Duplicates.

    And then apply a fomula to (g?) =SUMPRODUCT(($A$1:$A$xx=G1)*($B$1:$B$xx)) and copy down

  5. #5
    Registered User
    Join Date
    09-16-2015
    Location
    Fairplay, Colorado
    MS-Off Ver
    10
    Posts
    3

    Re: Macro to total values based on vendor criteria, delete rows & continue on

    Will give it a try, thank you kindly.

+ 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] Macro to delete rows based off criteria?
    By pancakes in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2015, 05:56 PM
  2. Replies: 1
    Last Post: 10-05-2014, 12:28 PM
  3. Macro to delete rows based on two different criteria matching
    By Cpower17 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2014, 05:43 PM
  4. [SOLVED] Macro to delete rows based on multiple criteria
    By Andrew E Smith in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-12-2014, 12:17 PM
  5. Macro to delete rows based on criteria in 2 maybe 3 fields
    By russellh79 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-31-2014, 03:46 PM
  6. macro - delete rows based on multiple criteria.
    By ChocksterNo1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-05-2013, 10:22 AM
  7. How can I delete rows based on specific criteria using a macro?
    By akouleze in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2011, 02:49 AM

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