Results 1 to 12 of 12

open a csv and compare the data with my existing worksheet.

Threaded View

  1. #1
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    open a csv and compare the data with my existing worksheet.

    Hi all,

    This may be a long post to try to describe the problem I'm tasked with solving.....

    I have an excel workbook which contains details of my customers who have all opted to receive emails from me from time to time.
    The worksheet is set out to look like a database and has the following 'field' titles...

    company, first name, last name, address 1, address 2, address 3, city, postcode, email, telephone.

    When I want to send out emails, I use swiftpage to send in bulk. around 200 at a time.

    I export a .csv from excel to swiftpage and sent out my bulk email.

    After this, I get a csv file from swiftpage with the following 'field' names...

    company, first name, last name, email, openings (the amount of times my customer opened the email.)

    The .csv file generated by swiftpage doesn't include the phone number which is a big problem for me as a large part of my business involves calling the people who read the email.

    What I would like to do is write a macro to compare the .csv generated with swiftpage with my workbook, create a new sheet and place the matches in the new sheet.

    Is this possible?

    Would I be able to add a file browser control to my form to browse for the .csv file or would I need to ensure it's saved in a certain location and code that into my macro? *edit* I found the answer to this, I can use
    Application.GetOpenFilename()
    *edit*

    can macros create a new sheet and name it or would I need to do this manually?

    I don't really know where to start other than opening the .csv for reading then comparing each email address with my existing workbook and copying the row with the matching email address into a new sheet.
    Anyone got any advice for me? I'm not asking anyone to write the code for me but if anyone could point me in the right direction I would be very grateful.

    I will of course share my code when the macro is complete. If someone can learn from it in the future that would be a good thing.


    Many thanks in advance,

    Paul.
    Last edited by sheffieldlad; 01-05-2013 at 09:46 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