title: Adding a Cell value into the HTML body of an Email in Excel
body: <p>I have to order reports on accounts daily and then send an email with all of the reports but it has to be formatted a certain way.  I finally made an Excel macro to order the reports but I am trying to make the macro also email the reports.  Here is what I have so far.</p>
  
  <pre><code>Sub Email()
      Dim OutApp As Object
      Dim OutMail As Object
      Dim Email As String
      Dim ws As Worksheet
  
      Set ws = Worksheets("Data")
      Set OutApp = CreateObject("Outlook.Application")
      Set OutMail = OutApp.CreateItem(0)
  
      K = 2
      Do While ws.Cells(K, 1) &lt;&gt; ""
          ws.Cells(K, 5) = "ACCT:" &amp; ws.Cells(K, 1).Value
  
          K = K + 1
      Loop
  
      Email = "Hello, &lt;br&gt;&lt;br&gt;" &amp; _
                      "The following reports were ordered today: &lt;br&gt;&lt;br&gt;" &amp; _
                              "&lt;br&gt; ws.Cells(2, 5) &amp; _
                              '"&lt;br&gt; ACCT:" &amp; ws.cells(1, 2) &amp; _
                               "&lt;br&gt;&lt;br&gt; Thank you." &amp; _
                         "&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;i&gt; Please note Call if you have any questions &lt;/i&gt;" &amp; _
  
      With OutMail
          .to = "me@me.com"
          .CC = ""
          .BCC = ""
          .Subject = "Statements Ordered"
          .HTMLBody = Email                                
          .Send
      End With
  
      Set OutMail = Nothing
      Set OutApp = Nothing
  End Sub
  </code></pre>
  
  <p>What I have it do is take the AC numbers that are in the book in column A and then match it with ACCT: so that cells E:E900 have ACCT: 12345.... but I dont know how to add that cell into the HTML body.  Below it I have commented out a 2nd way I tried but also failed and that was to try and match the ACCT: &amp; ws.Cells(1,2).  </p>
  
  <p>So Question: is there a way to either use an If then statement inside of the HTMLbody or is there a way to add the cell value inside the HTMLbody?</p>