+ Reply to Thread
Results 1 to 10 of 10

Matching Debits and Credits in one column with Vendor Criteria from another column

  1. #1
    Registered User
    Join Date
    06-24-2016
    Location
    Pennsylvania
    MS-Off Ver
    2010
    Posts
    19

    Matching Debits and Credits in one column with Vendor Criteria from another column

    Hello Excel Community!

    I have been working on trying to develop a function that will be used to search a specific Vendor name, than return ANY MATCHING Debit (negative value) and Credits (Positive Value) to result in a canceling of transaction value. I was fortunate to find this function, from a very helpful source on this forum..

    =IF(B2="","",IF(B2<0,-B2&"_"&COUNTIF(B$2:B2:B11,B2),B2&"_"&COUNTIF(B$2:B2:B11,B2)))

    Then follow it up by:

    =IF(COUNTIF(C:C,C2)=2,"x","")

    This equation assumes Vendor in column A, Debit and credits in column B


    the function seems to work great for matching most D's to C's, but it is also matching values that are opposite for different vendors (EG; 200 for one vendor and -200 for a totally opposite vendor).

    I was wondering if anyone could put something into place to search vendor criteria, THAN corresponding debits and credits..

    You all are the best!

    Excel Debit _Credit.PNG
    Last edited by jhm5139; 06-24-2016 at 08:31 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,319

    Re: Matching Debits and Credits in one column with Vendor Criteria from another column

    Please post a sample file.

    to upload file, click "Go Advanced" then scroll down to "Manage Attachments"

  3. #3
    Registered User
    Join Date
    06-24-2016
    Location
    Pennsylvania
    MS-Off Ver
    2010
    Posts
    19

    Re: Matching Debits and Credits in one column with Vendor Criteria from another column

    Please see attached for sample!

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,319

    Re: Matching Debits and Credits in one column with Vendor Criteria from another column

    See attached.

    I added a column called ID number (of each vendor) which is added to string in C

    =IF(C2="","",IF(C2<0,-C2&"_"&COUNTIF(C$2:C2,C2)& "_" &A2,C2&"_"&COUNTIF(C$2:C2,C2)& "_" &A2))

    This allows matching of vendor TXs

  5. #5
    Registered User
    Join Date
    06-24-2016
    Location
    Pennsylvania
    MS-Off Ver
    2010
    Posts
    19

    Re: Matching Debits and Credits in one column with Vendor Criteria from another column

    Quote Originally Posted by JohnTopley View Post
    See attached.

    I added a column called ID number (of each vendor) which is added to string in C

    =IF(C2="","",IF(C2<0,-C2&"_"&COUNTIF(C$2:C2,C2)& "_" &A2,C2&"_"&COUNTIF(C$2:C2,C2)& "_" &A2))

    This allows matching of vendor TXs
    Awesome job!! Thank you. My next question is this - I am working with thousands of rows of data. Is there an easy way to assign a specific number to the varying instances of vendors?

  6. #6
    Registered User
    Join Date
    06-24-2016
    Location
    Pennsylvania
    MS-Off Ver
    2010
    Posts
    19

    Re: Matching Debits and Credits in one column with Vendor Criteria from another column

    Quote Originally Posted by jhm5139 View Post
    Awesome job!! Thank you. My next question is this - I am working with thousands of rows of data. Is there an easy way to assign a specific number to the varying instances of vendors?
    I found this: which reads the column and row number than assigns to text. I'm thinking maybe an if statement could tie that to vendor lookup..

    =ROW()&COLUMN()&A2

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,319

    Re: Matching Debits and Credits in one column with Vendor Criteria from another column

    With Cell A1 blank AND data sorted by VENDOR

    in A2

    =IF(B2<>B1,A1+1,A1)

    copy down

  8. #8
    Registered User
    Join Date
    06-24-2016
    Location
    Pennsylvania
    MS-Off Ver
    2010
    Posts
    19

    Re: Matching Debits and Credits in one column with Vendor Criteria from another column

    Quote Originally Posted by JohnTopley View Post
    With Cell A1 blank AND data sorted by VENDOR

    in A2

    =IF(B2<>B1,A1+1,A1)

    copy down
    AMAZING!!! Thank you, John! You the man!

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,319

    Re: Matching Debits and Credits in one column with Vendor Criteria from another column

    You are very welcome.

    If your problem has been resolved, could you please mark thread as solved ("Thread Tools" at top of first post).

  10. #10
    Registered User
    Join Date
    06-24-2016
    Location
    Pennsylvania
    MS-Off Ver
    2010
    Posts
    19

    Re: Matching Debits and Credits in one column with Vendor Criteria from another column

    Quote Originally Posted by JohnTopley View Post
    You are very welcome.

    If your problem has been resolved, could you please mark thread as solved ("Thread Tools" at top of first post).
    With pleasure

+ 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. Matching Debits and Credits
    By jharvey87 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2016, 08:38 AM
  2. Matching Debits and Credits
    By Hiruy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-08-2015, 07:06 AM
  3. Debits and credits
    By Willow350 in forum Excel General
    Replies: 2
    Last Post: 12-07-2014, 11:34 AM
  4. [SOLVED] debits and credits in one column
    By childothe1980s in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-26-2013, 03:47 PM
  5. Matching debits and credits within range of cells
    By drewzilla652 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-28-2010, 12:35 PM
  6. [SOLVED] Change debits to credits
    By Yo in forum Excel General
    Replies: 1
    Last Post: 04-10-2006, 08:20 PM
  7. incrementing rows for matching debits/credits
    By childofthe1980s in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2005, 04: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