Results 1 to 5 of 5

Thread: Algorithm For Compare Rows by Three Columns

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,709
    Location
    @ iwanna,

    Look at this attachment and tell me if the Blue cells are correct.

    I deleted many Rows of data to make the file size smaller.

    Can you force Bonilla White, Belinda to use one name only? If you cannot, then can we put her in the Report as two persons (names)?

    Also, will you look at and approve the Business Rules below

    @ Code Experts

    Business Rules:
    • Raw Reports contains Paid table and Billed Table.
    • Billed table includes Staff and Independent Contractors
    • Paid Table includes IC's, but not Staff
    • Paid vs Billed Report shall not contain Staff or IC's
    • IC Report shall contain ICs only




    Possible Algorithm:

    Objects and Variables:
    • UDT for Required Fields
    • Dictionaries Paid, Billed, Billed Contractors and PaidContractors: Keys = LastName & FirstName & PayCode; Items = UDT
    • Dictionaries ICs and Staff, Key = LastName; Item = FirstName



    Compare Paid Table to ICs Dict, If Exist then add to PaidContractors, Else add to Paid Dict.
    Compare Billed Table to Staff Dict. If not Exists Then compare to ICs Dict, etc as before


    For each Key in Billed 
    Write UDT fields to Report Record
    If Paid.Exists(Billed.Key) then 
    Write Paid(Billed.Key) Fields to Record
    Else: Write Comments to Record.
    End If
    Next Key
    Repeat with Billed and PaidContractors for their report.
    Attached Files Attached Files
    Last edited by SamT; 10-15-2013 at 08:00 PM.
    Please take the time to read the Forum FAQ

Posting Permissions

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