+ Reply to Thread
Results 1 to 4 of 4

Duplicate email address

  1. #1
    Registered User
    Join Date
    02-17-2017
    Location
    Cornwall, England
    MS-Off Ver
    2016
    Posts
    23

    Duplicate email address

    Hi I have a work sheet that some times have the same email address in the column more than once. Hen I click on my send email button it looks at the column and generates the email but at the moment it will put the same email in more than once. How can I get the code to only put it in once?

    My code is below any help would be grateful many thanks.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Duplicate email address

    Try:

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Duplicate email address

    Hi,

    I'd change your For..Next Loop to

    Please Login or Register  to view this content.
    In addition don't cover the whole of column E. Always restrict anything like this to just the used range. Apply a dynamic range name to the column E addresses and use the name in the code

    And it's better to use the VBA sheet CODE name not the Excel sheet tab name since this is too easily changed.

    A better option still is to simply use the Remove Duplicates functionality at the start of your procedure and avoid the loop altogether. e.g.

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    02-17-2017
    Location
    Cornwall, England
    MS-Off Ver
    2016
    Posts
    23

    Re: Duplicate email address

    Many thanks guys all works I will mark as solved

+ 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. 1 email per email address, include cell value in email subject
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-31-2019, 10:27 PM
  2. Replies: 9
    Last Post: 12-09-2016, 12:45 AM
  3. [SOLVED] vba email send from excel - ignore second email address if "ENTER EMAIL ADDRESS"
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2016, 07:22 AM
  4. Email a screenshot of a specifc row in an email to a specfic email address
    By Cobra75007 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-19-2015, 10:36 AM
  5. Replies: 1
    Last Post: 03-08-2012, 01:57 PM
  6. Merging Row Data Based on Duplicate Email Address
    By daximus in forum Excel General
    Replies: 0
    Last Post: 12-27-2011, 09:00 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