+ Reply to Thread
Results 1 to 7 of 7

macro that deletes matching under same client and odd entries

  1. #1
    Registered User
    Join Date
    04-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    56

    macro that deletes matching under same client and odd entries

    Hi guys

    I have no idea how to start this can someone please help as it would simplify my work a lot.

    I have 3 columns I want to compare

    Column A = Clients
    Column G = Amounts
    Column N = Case ID


    So let’s say

    Client | Amount | Case ID
    Mike | 50|123
    John | -50 |123
    Mike | 50 |123
    Mike | -50 |123
    John | 20 |456
    John | -20 |456
    Mike| -20 |456


    I want the macro to:


    Find debits and credits that match with the same client and case ID e.g. Mike has go a debit and a credit for 50.00 and john has got a credit and debit for 20.00 under the same case ID (Macro is to delete these transactions (Row))
    Remove any transactions that don’t have an contra, e.g. once matching has been deleted Mike will be left with a credit for 20.00 and the case ID and amount doesn’t match any other transactions (I need this to be deleted)
    Then I should be left with debits and credits that match for different clients for example John has a credit for 50 and mike has a debit for 50 under the same case ID, so I should be left with:


    Client | Amount | Case ID
    Mike | 50|123
    John | -50 |123

    I’d really appreciate it if someone could help me write a macro to do this, please use Column A, G and N as stated above.

    Thank you
    Attached Files Attached Files
    Last edited by fawnlemur; 07-20-2019 at 02:04 PM. Reason: added attachment

  2. #2
    Registered User
    Join Date
    04-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    56

    Re: macro that deletes matching under same client and odd entries

    Hi

    Someone has helped me with the first part, can someone have a look at the second part please:
    Please Login or Register  to view this content.

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

    Re: macro that deletes matching under same client and odd entries

    If the unique key is the combination of "Client" & Case ID" then
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    56

    Re: macro that deletes matching under same client and odd entries

    Hi

    I don't want it to add the totals and move them to a new sheet, I need it to just delete the row.

    Thanks
    Last edited by AliGW; 07-17-2019 at 03:25 AM. Reason: Please don't quote unnecessarily!

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

    Re: macro that deletes matching under same client and odd entries

    Upload a workbook with before/after.

  6. #6
    Registered User
    Join Date
    04-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    56

    Re: macro that deletes matching under same client and odd entries

    Quote Originally Posted by jindon View Post
    Upload a workbook with before/after.
    Hi

    I've added an attachment with before and after.

    I want it to delete everything unless it's a debit and a credit that match and have the same case reference but for different clients.

    Thank you

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

    Re: macro that deletes matching under same client and odd entries

    Sorry, but I don't understand the logic to derive the result from the data provided.

    Please wait for someone else to come in.

+ 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] how to avoid multiple entries on a client list
    By Ildrim in forum Excel General
    Replies: 5
    Last Post: 06-09-2019, 03:17 AM
  2. [SOLVED] Client Data in Columns - how to create a client drop down
    By abearmenta in forum Excel General
    Replies: 9
    Last Post: 10-10-2016, 10:24 AM
  3. [SOLVED] Moving variable data from multiple same-client records to one client record
    By jkilday4 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-19-2015, 02:32 PM
  4. One spreadsheet but adding hours on a client by client basis..
    By arthurArthur in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-01-2013, 01:58 AM
  5. Combining multiple rows for multiple client entries
    By skinpup in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-01-2013, 08:28 AM
  6. VBA macro needed to delete duplicate entries matching across multiple columns
    By chicolocal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2012, 02:34 PM
  7. format cell to recall client name-enter a client #
    By cheryl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-22-2005, 06:05 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