Results 1 to 7 of 7

VBA to assign a group/household number to similar invoice customers

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,176

    VBA to assign a group/household number to similar invoice customers

    I have a file of ~40,000 unique invoices, which I need to group by customer name. The file is made of following fields:
    Invoice Number
    First Name
    Last Name
    Mailing Address
    City
    Zip

    I need to accomplish two parts to this process:

    (1) The first step is to identify similar customers and update Mailing Address, if required. A similar address is all three fields being equal: 1 - Last Name (exact match) 2 - Mailing address (exact match of first 5 characters only) 3 - Zip Code (exact match). If an exact match is found, then update address, if required. As an example, two invoices are as follows:

    Invoice 1 Last: Smith
    Invoice 1 Address: 123 Smith Avenue
    Invoice 1 Zip: 10021

    Invoice 2 Last: Smith
    Invoice 2 Address: 123 Smith Ave
    Invoice 2 Zip: 10021

    In this case, change address for Invoice 2 from 123 Smith Ave to 123 Smith Avenue

    (2) the second step is to assign a group number. To continue above example, both Invoice 1 and Invoice 2 are assigned to Group Number 1.

    Once all similar records have been updated for one group, then move on to next group and so on. Attached is small sample of data with expected/desired results (column I and J). Thanks
    Attached Files Attached Files
    Last edited by maacmaac; 12-22-2011 at 09:36 PM.

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