I found the following macro on a MicroSoft forum that does almost what I want.
I want to send two ranges of cells (A1:A20) and C1:F20) side by side in an email to a specific set of individuals based on whether a specific cell in the spreadsheet is less than 0.
I tried using different if statements. I get error messages.
Sub Send_Range()
If (F187 < 0) Then
' Select the range of cells on the active worksheet.
ActiveSheet.Range("A1:A20").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "xxxxxxxxxx"
.Item.To = "James@gmail.com"
.Item.CC = "Alison@gmail.com"
.Item.Subject = "Subject"
.Item.Send
End With
End If
End Sub