+ Reply to Thread
Results 1 to 4 of 4

Send e-mail - filter date range & customer name

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Send e-mail - filter date range & customer name

    Evening All

    With the attached worksheet I am trying to e-mail the customer a weekly acknowledgement e-mail of the submissions they sent last week (Monday-Sunday) and submissions which have been completed.

    I have two issues:

    - The code e-mails every customer, even if they didn't send or have completed any work last week. I'm guessing I need to alter the below?

    Please Login or Register  to view this content.
    - Secondly, I cannot get the code to pick up the date range in Column D. If I change the format to number type no problem but in Date format the e-mails all appear blank. Any ideas please?

    Please Login or Register  to view this content.


    Many thanks!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: Send e-mail - filter date range & customer name

    1st issue: there is nothing (criteria) which reduces the number of emails. A criteria for
    even if they didn't send or have completed any work
    is missing

    2nd issue: if you check the variables in the "Local Window" you see that "ProjectData" is of type Variant/String and you compare therefore a string with a double
    change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    cheers

  3. #3
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Re: Send e-mail - filter date range & customer name

    Thanks gue2013, that makes sense for the dates

    Could someone please show me how to filter the raw data in memory for criteria:
    -Col 3 or Col 6 in ShtRng: >= LW3 and <=LW1

    and how I pass the filter data in memory to the next part of my code?

    Cheers!
    Last edited by warp765; 04-11-2020 at 10:10 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: Send e-mail - filter date range & customer name

    only add two more (the easiest way)
    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)

Similar Threads

  1. [SOLVED] Send outlook mail based on a today's date and customer name
    By manieldunk in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-20-2018, 02:04 PM
  2. [SOLVED] Send mail to all in range
    By forfiett in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 08-06-2014, 01:12 PM
  3. Replies: 1
    Last Post: 03-11-2014, 12:24 PM
  4. Using VBA to send a range in pdf via e-mail
    By BullseyeThor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2013, 11:54 AM
  5. Filter based on today's date and send mail in outlook
    By kandanuru in forum Excel General
    Replies: 0
    Last Post: 06-15-2012, 04:59 AM
  6. Replies: 3
    Last Post: 05-11-2012, 09:21 AM
  7. How to e-mail selected row and use e-mail address in a cell to send e-mail from excel
    By syedalamgir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2010, 02:15 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