+ Reply to Thread
Results 1 to 4 of 4

Cannot prevent duplicate entries from being uploaded into excel database during CSV import

  1. #1
    Registered User
    Join Date
    12-26-2013
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Lightbulb Cannot prevent duplicate entries from being uploaded into excel database during CSV import

    Hi,

    I am new to VBA code and this forum has been very helpful to me however I am struggling to find a solution to my latest problem anywhere...please can you help?!

    I am currently using the code below to import a CSV file into an excel sheet call 'Raw Data'. I would like to update this code to prevent a CSV file being uploaded to 'Raw Data' if cell A4 in the CSV file matches an existing entry within column A of the 'Raw Data' sheet. If a record already exists then a message should be displayed saying something like "Record already exists, data has not been imported"

    For reference I attach a copy

    Please Login or Register  to view this content.
    Thanks in advance, Graeme
    Attached Files Attached Files
    Last edited by walkerg1983; 01-19-2014 at 12:31 PM. Reason: To comply with forum rules.

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Only import CSV data if no match found in excel data

    it would be greate if you provide both sample workbook
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2013 on Win10 (desktop), 2007 on Win10 (notebook)
    Posts
    7,998

    Re: Only import CSV data if no match found in excel data

    Hi, walkerg1983,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    12-26-2013
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Only import CSV data if no match found in excel data

    Apologies....updates now made to forum post and files attached.

    Graeme

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 08-09-2013, 05:54 PM
  2. [SOLVED] Import Excel Data to Find Match in Access Table
    By CRW in forum Access Tables & Databases
    Replies: 3
    Last Post: 09-15-2012, 08:11 AM
  3. Merging data from two sheets where match is found
    By vertigo44 in forum Excel General
    Replies: 2
    Last Post: 04-27-2011, 01:56 PM
  4. Replies: 7
    Last Post: 10-06-2010, 04:50 AM
  5. Moving data when a match is found
    By E3iron in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2010, 06:03 PM

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