+ Reply to Thread
Results 1 to 7 of 7

Loop through autofilter and send via email to address in column L

  1. #1
    Registered User
    Join Date
    09-01-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    6

    Loop through autofilter and send via email to address in column L

    Hi

    I would appreciate your help in my problem that I am having.

    I have a spreadsheet that I need to loop through the autofilter and send the results to the email address in column K. The autofilter needs to be where J is not blank and an email address in column K.

    The results need to be copied into a new workbook each time. The workbook does not need to be saved each time. Once the email has been sent the rows need moving from "To be allocated" sheet to the relevant sheet which is decided by the first letter in column I, If M needs to go to sheet named "M" if C needs to go to sheet named "C".

    Example attached.

    Kind Regards
    Mike
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-01-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Loop through autofilter and send via email to address in column L

    I have just found a similiar post where the results are saved each time which is below. But can't get this working there only difference would be the workbook does not need to be saved and that the workbook needs to be emailed to the address contained in column K.

    http://www.excelforum.com/excel-prog...ered-list.html

    Any help would be appreciated.

    Cheers
    Mike

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Loop through autofilter and send via email to address in column L

    What results need to be emailed? I see the YES flags in column J and the email address in column K, but what exactly is being sent?

    Meanwhile, here's a link to a thread recently where we worked on something similar:
    http://www.excelforum.com/excel-prog...sed-on-in.html
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    09-01-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Loop through autofilter and send via email to address in column L

    Once the autofilter has been done, the columns A to J need to be copied into the new workbook and sent via email to the address in column K.

    I will have a look at the thread you have provided.

    Cheers
    Mike

  5. #5
    Registered User
    Join Date
    09-01-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Loop through autofilter and send via email to address in column L

    Almost done it with the below code. Just need to move the rows onto the other sheet once the email has been sent. I have changed the formula in column K to only show the address if J is not blank therefore only needing one filter.


    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-01-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Loop through autofilter and send via email to address in column L

    Everything is now working but how do I stop it from trying to autofilter for blanks?

    Cheers
    Mike

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Loop through autofilter and send via email to address in column L

    Maybe tweak this:
    Please Login or Register  to view this content.

+ Reply to Thread

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