+ Reply to Thread
Results 1 to 3 of 3

Settle credit notes by VBA

  1. #1
    Registered User
    Join Date
    08-15-2014
    Location
    Zurich
    MS-Off Ver
    2007
    Posts
    3

    Settle credit notes by VBA

    Dear vba experts

    I'm trying to create a macro and don't know how to proceed.

    I need a macro that searches through column F(amount). If it finds a negative amount(a credit note), it should search through column A(client ID), look for the same client and deduct the amount from the oldest invoice of this client. Then it should delete the whole line of the credit note.
    If it doesn't find the same client, it should not adjust anything.

    If the negative amount is a cancellation(all records with the invoice number 9999999), it should not adjust anything.

    If the amount of the oldest invoice is smaller than the credit note, it should deduct down to 0 and deduct the rest of the credit note from the second oldest invoice.

    I hope my explanation is good enough. I have attached a sample file.

    I would be grateful if someone could help me further.
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Settle credit notes by VBA

    Duplicate Post Deleted
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Settle credit notes by VBA

    Hi Omey,

    This is what I've got so far but were there any credit-debit matches in your sample?

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-15-2014
    Location
    Zurich
    MS-Off Ver
    2007
    Posts
    3

    Re: Settle credit notes by VBA

    hi,

    Thanks a lot for your help.

    Could you please explain me the steps you do in the macro?

    When I run it, it takes hours and never stops..

  5. #5
    Registered User
    Join Date
    08-15-2014
    Location
    Zurich
    MS-Off Ver
    2007
    Posts
    3

    Re: Settle credit notes by VBA

    hi,

    Thanks a lot for your help.

    Could you please explain me the steps you do in the macro?

    When I run it, it takes hours and never stops..

+ 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. Using Macro to separate credit term and non credit term
    By gingank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2012, 02:22 AM
  2. end notes, foot notes and an Index Table
    By thadacto in forum Word Formatting & General
    Replies: 1
    Last Post: 12-27-2011, 06:22 PM
  3. Replies: 1
    Last Post: 05-13-2007, 12:16 PM
  4. Invoice and Credit Notes
    By craig in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-16-2005, 02:06 PM
  5. Invoice and Credit Notes
    By craigoutinoz@hotmail.com in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-01-2005, 10:06 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