+ Reply to Thread
Results 1 to 13 of 13

Cant put correct cell as subject line in email

  1. #1
    Registered User
    Join Date
    04-30-2010
    Location
    Fairmont,WV
    MS-Off Ver
    Excel 2007
    Posts
    66

    Post Cant put correct cell as subject line in email

    I have a worksheet that opens daily. 3 columns have dates in them. I already have a code that sends an email out automatically when the current date is reached in any of three columns. What I am trying to so is this: when the workbook opens and it finds the current date in a cell ( or cells) from this column, it goes to the cell in column "A" of that row and places the data in it as the subject line, even if there are multiple cells with the current date in them, meaning I may have more than one cell to use as the subject line. I have dates in columns C,D and E. I would like and cell(s) with the current date to go to Column A of that row and place that data as the subject line.

  2. #2
    Registered User
    Join Date
    06-18-2014
    Location
    Dallas, Texas
    MS-Off Ver
    Home and Business 2010
    Posts
    84

    Re: Cant put correct cell as subject line in email

    Could you could post either an example workbook or the code that you are using?

  3. #3
    Registered User
    Join Date
    04-30-2010
    Location
    Fairmont,WV
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Cant put correct cell as subject line in email

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-18-2014
    Location
    Dallas, Texas
    MS-Off Ver
    Home and Business 2010
    Posts
    84

    Re: Cant put correct cell as subject line in email

    Try adding a portion that moves the dates and then add that value to EmailSubject line ie
    Please Login or Register  to view this content.
    Your code needs to go inside of the For Each loop though except for all of the dim statements

  5. #5
    Registered User
    Join Date
    04-30-2010
    Location
    Fairmont,WV
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Cant put correct cell as subject line in email

    The dates are produced froma formula that gets data from the date in a different column. Not sure what you mean by moves the dates but I need the spreadsheet to stay as is...just thot there may be a code snippet to help with the subject line.

  6. #6
    Registered User
    Join Date
    06-18-2014
    Location
    Dallas, Texas
    MS-Off Ver
    Home and Business 2010
    Posts
    84

    Re: Cant put correct cell as subject line in email

    So column A already has the date in it and you want to add that date to the subject line. try adding
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-30-2010
    Location
    Fairmont,WV
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Cant put correct cell as subject line in email

    Column A has names. Column B has hire dates. Each column after that ( C,D, and E)'s dates are derived from the date in column B. Each has an amount days added to them to trigger reminders. So when any of them ( except column B) equals the current date, I have the email sent out. I would like the subject to be the name (in column A) that corresponds to the row where the date is matched with the current date . In theory, this may be more than one name matches the criteria.

  8. #8
    Registered User
    Join Date
    06-18-2014
    Location
    Dallas, Texas
    MS-Off Ver
    Home and Business 2010
    Posts
    84

    Re: Cant put correct cell as subject line in email

    Ok so the code I put in the last one will loop through and create an email for every name in column a and that is not what you want. The only solution I can think of would be to add loop through column a then use if statements to trigger the creation of the email.

  9. #9
    Registered User
    Join Date
    04-30-2010
    Location
    Fairmont,WV
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Cant put correct cell as subject line in email

    I already have the whole thing working good. Everyday, the computer opens this workbook automatically. When it opens, it runs the code automatically. If any of the dates in columns C,D, or E equals the current date when the workbook is opened, it triggers an email to be sent along with a pdf of the worksheet. The receiver of the email can look through the pdf image and see who needs the attention. But if this list gets long, and it may, it would be nice to have the names of the persons put in the subject (or even body) of the email to help identify the problem person. I really dont want to change the trigger for the email. I just thought there might be a code that finds the current date...goes to the name in that row (column A), and adds it as a subject...continues adding names if necessary.

  10. #10
    Registered User
    Join Date
    06-18-2014
    Location
    Dallas, Texas
    MS-Off Ver
    Home and Business 2010
    Posts
    84

    Re: Cant put correct cell as subject line in email

    If your sending a pdf of the worksheet then why not highlight the problem person with a workbook change event that highlights fills the cell with a color
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    04-30-2010
    Location
    Fairmont,WV
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Cant put correct cell as subject line in email

    I already have that happening in conditional formatting. Like I mentioned, the person receiving the email can always scan down through the pdf and manually find the problem person. But if this list has 250 people on it, and only three are problem people, then it would be a lot easier to have their names as subjects, saving alot of time.

  12. #12
    Registered User
    Join Date
    06-18-2014
    Location
    Dallas, Texas
    MS-Off Ver
    Home and Business 2010
    Posts
    84

    Re: Cant put correct cell as subject line in email

    Well I am all out of ideas on that front then. Sorry I was not able to be more helpful

  13. #13
    Registered User
    Join Date
    04-30-2010
    Location
    Fairmont,WV
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Cant put correct cell as subject line in email

    That's completely ok. I appreciate your time and effort.

+ 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. creating a macro to use cell content as subject line in sending email - protected sheet
    By John Eathorne in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-18-2013, 05:06 PM
  2. Macro Automate Email Subject Line Based on Cell Value
    By richzipday in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2013, 06:33 PM
  3. Add cell value to email subject line
    By shariq1989 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-02-2012, 01:28 PM
  4. Tab Name in Email Subject Line
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-20-2010, 02:37 PM
  5. Value of a cell for email subject line
    By Kevin K. Chlipa in forum Excel General
    Replies: 4
    Last Post: 11-28-2008, 06:45 PM

Tags for this Thread

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