Consulting

Results 1 to 3 of 3

Thread: Match two rows across various columns using VBA

  1. #1
    VBAX Regular
    Joined
    Apr 2016
    Posts
    67
    Location

    Match two rows across various columns using VBA

    Hi All,

    Requirement :


    * A Trade (source column) is always compared agianst Invoice (source column)
    * First step is to validate if Match ID's are always equal. In most cases, there will only be two rows that has Match ID equal
    * Counterparty name will match exactly but then there are two sub conditions :
    1 Match only first 4 characters or alphabets in the cell
    2 Should it fail, then refer to mapping table, on the adjacent sheet, where a mapping would be provided
    * Notional : Has Three validations
    1 Compare Invoice line item against trade item
    2 If the above doesnt match, then match it against Trade item under Amt. in Buy Curr column
    3 If the above doesnt match, then match it against Trade item under Amtount in Selll Curr column
    * Curr Cross : Match the Invoice line item against the trade item.


    If the above criterias fail, then mark result as fail, under "Result" column. And also, list the failure element under "Comment" column
    Attached Files Attached Files

  2. #2
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    613
    Location
    Not certain how far your code functions correctly ... however, the following Column Header [ TYPE ] is missing and your code is failing on this line:

    matchcol4 = Range("A1:K2").Find(What:="Type", LookIn:=xlValues, LookAt:=xlWhole, _

  3. #3
    VBAX Regular
    Joined
    Apr 2016
    Posts
    67
    Location
    My code is WIP and i was hoping to find a much efficient code on this forum ... Yes, i have removed Type as it is no longer in play.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •