+ Reply to Thread
Results 1 to 7 of 7

Compare Amt between lines and move if matched

  1. #1
    Registered User
    Join Date
    10-01-2009
    Location
    Manassas, VA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Compare Amt between lines and move if matched

    Hi all,

    It's just a thought and I'm not sure if it's even possible.

    Please see the sample I've attached.

    I have a report that has thousands of lines... debits & credits. Most of them offset one another, 0 balance. However, there are still many w/ missing credits that need to be identied. Instead of going thru 10,000+ lines to pull out lines w/o credits - Is there a way that I can cross check the amount between lines (1&2, 2&3, 3&4 etc etc) and if their total is 0 then I want to move them to another sheet (Matched)?

    Sorry if it's too confusing!

    Thank you,

    NTB
    Attached Files Attached Files
    Last edited by NTB; 10-29-2009 at 07:43 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Compare Amt between lines and move if matched!

    Hello NTB,

    What about these lines? Do they not match?
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-01-2009
    Location
    Manassas, VA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Compare Amt between lines and move if matched!

    Yes... the it's the amount we're looking at... so those 2 lines will get cut over to 'Matched' since the sum between them is 0

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Compare Amt between lines and move if matched!

    Hello NTB,

    What would you do when there are multiple credits applied to the same transaction?

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Compare Amt between lines and move if matched

    Hello NTB,

    That was fun. It works on the data you posted, but the real test is with the actual data. Run this on a copy of the original workbook to check the results. I added a button on the Data sheet to run the macro. Here is the macro code...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-01-2009
    Location
    Manassas, VA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Compare Amt between lines and move if matched

    Just woke up and saw your response. I will test it at work, but you are truly amazing.
    Thank you for spending time on this, and I will let you know the result w/i 2 hours.

    NTB

  7. #7
    Registered User
    Join Date
    10-01-2009
    Location
    Manassas, VA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Compare Amt between lines and move if matched

    It worked! Hooray :o)

    Thanks a million!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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