Forum Discussion

Re: Value from Cell to Autofill Email

Elcten 

That would be

 

emailItem.Body = "Hello," & vbNewLine & vbNewLine & "Please be advised quote number: " & Range("D4").Value & " has been accepted in our system"

 

Note that I added spaces in the strings before and after the value of D4.

If the name Lyle (or whatever) is in E4, it could be

 

 

emailItem.Body = "Hello " & Range("E4").Value & "," & vbNewLine & vbNewLine & "Please be advised quote number: " & Range("D4").Value & " has been accepted in our system"

6 Replies

  • Edg38426's avatar
    Edg38426
    Brass Contributor

    Is it possible to use a worksheet event (such as entering a date into a cell) to then use a dynamic reference (rather than an absolute "D4" ref) to send an email unique to a particular table row?

    • Edg38426 

      Let's say you have dates in B4:B50, and you enter a date in B2.

      The code could then search for that date in B4:B50 and look up the value in column D in the row where the date is found.

      • Edg38426's avatar
        Edg38426
        Brass Contributor
        What I would like is for when a date is entered into, for example, cell B10 ("work order completed"), to then send an auto email which includes the data from cell D10 ("work order number"). And then any time a date is entered into column B, the email would contain the corresponding information from column D in that same row. Would this do that?
  • Elcten's avatar
    Elcten
    Copper Contributor
    I'll give that a try! Thank you so much for your help 🙂

Resources