Results 1 to 3 of 3

Macro that compares Values in a Column to Based on Values in Different Column

Threaded View

  1. #1
    Registered User
    Join Date
    04-05-2012
    Location
    Southfield, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    63

    Macro that compares Values in a Column to Based on Values in Different Column

    Hi All,

    I am working with a large number of client company emails (tens of thousands of emails belonging to hundreds of different client companies.)

    I need to determine from the email data the most likely email format for EACH CLIENT.

    My spreadsheet has FOUR different columns:

    Col A: Full Email Address (ckent@dccomics.com)
    Col B: Email Prefix (ckent)
    Col C: Email suffix (@dccomics.com)
    Col D: Company DC Comics

    The Sheet is sorted by Company Name (COL D)

    Corporate email formats are actually pretty straightforward. They're usually either:

    FirstInitialLastName: (ckent)
    FirstNameLastName: (clarkkent)
    LastNameFirstInitial: (kentc)
    FirstName.LastName: (clark.kent)
    FirstName_LastName: (clark_kent)

    The Macro needs to do the following:

    1) Look at all of the PREFIXES (Col B) for EACH PARTICULAR COMPANY in Col D
    2) Determine what format is most common for the company listed in Col D.
    3) On Sheet2 List the Email format in COL A and the Company in COL B.

    -If the majority of addresses contain NO dots or dashes THEN assume FirstInitialLastName (ie: ckent)
    -If the majority of addresses contains DOTS then assume FirstName.LastName (ie: clark.kent)
    -If the majority of addresses contains UNDERSCORES then assume FirstName_LastName (clark_kent)

    I've included a sample workbook to illustrate.

    Thank you,

    RJ
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sum values in column based on unique values in correlating column.
    By ericbinfet in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-03-2015, 11:41 AM
  2. Replies: 5
    Last Post: 06-12-2014, 06:34 AM
  3. Replies: 1
    Last Post: 05-14-2014, 05:09 PM
  4. Calculate mean of column B values based on date values in column A
    By up&down in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-05-2013, 12:26 PM
  5. Macro that compares values in a list and add and deletes values.
    By keis386 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2012, 04:17 PM
  6. Macro that will copy values in Column J and paste values to Column B in new sheet
    By Phixtit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2010, 04:56 PM
  7. Replies: 3
    Last Post: 06-10-2010, 11:54 AM

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