+ Reply to Thread
Results 1 to 3 of 3

Summing based on 2 criteria matching

  1. #1
    Forum Contributor
    Join Date
    04-13-2011
    Location
    Havant, Hants, England
    MS-Off Ver
    Excel 2010
    Posts
    116

    Summing based on 2 criteria matching

    Hi, I've created a routine that loops down through a spreadsheet and, if the date (column 1) and the Cheque No (column 4) are equal, sums the values of the individual transactions in a new column (called "Transaction totals"). The routine works but I'm sure it's a little longwinded.... Does anyone know a slicker way to approach this? I've added a sample file from the larger application with the relevant sheet and code in it,

    thanks for any help or guidance,

    regards, neil

    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Summing based on 2 criteria matching

    Try the attached.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    04-13-2011
    Location
    Havant, Hants, England
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: Summing based on 2 criteria matching

    Hi AB33, thanks for the reply. It doesn't quite do it as needed. When my code runs it leaves all the data rows intact but sums identical rows (based on date and Cheque No.) & puts that total in line with the first row (of the identical lines) - your code reduces all identical rows to 1 row and sums them. Can you rework?

    BTW you answered a previous question of mine a while ago using arrays and scripting dictionary which was very successful and useful. I've since taught myself how to use arrays but not good enough to write this code as yet. Hence if you can show me how to do this then, as I have written code to carry out the function, it will be very helpful to learn more by seeing your code versus mine,

    best regards, Neil

+ 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] summing based on a criteria but the criteria is not the format i want
    By uimhirADo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-01-2013, 04:16 PM
  2. Replies: 6
    Last Post: 06-08-2011, 09:49 PM
  3. Summing Ranges in workbook based on matching values
    By scaffdog845 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-13-2011, 02:02 PM
  4. Replies: 2
    Last Post: 06-08-2010, 12:58 PM
  5. Summing based on a Criteria
    By Smee in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2008, 11:10 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