• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Trigger email to Individual User

Status
Not open for further replies.

Gunasekaran

Member
Hello,

After Multiple tried, i did few code work, based on data. But I am not able to create emails for List of Users one by one Instead Single shot email for all Users?

If No User data, then No need to Send email. Kindly suggest me.


I need to send email to Individual Users with Body of contain in that Each Line with Header Wise.

Request you to make short Macro code, instead of my code is lengthy code.
Code:
Sub Macro1()
Dim sToday As String

Set Sh = Sheet1
Set Ws = Sheet2

Ws.Cells.Clear

lr = Sh.Range("A" & Rows.Count).End(xlUp).Row

Trgv = "Earn Leave"
sToday = Format(Date + 1, "MMM-DD")
Sh.Activate
Sh.Cells.Find(What:=sToday, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

Sh.Range("A1:A" & lr, "C1:C" & lr).Copy Ws.Range("A1")

ActiveCell.EntireColumn.Copy Sheets("Sheet2").Cells(1, 4)
Application.CutCopyMode = False

lr = Ws.Cells(Rows.Count, 1).End(xlUp).Row
For i = lr To 2 Step -1
If Ws.Range("D" & i) <> "Earn Leave" Then
Ws.Range("D" & i).EntireRow.Delete
End If
Next i
End Sub



LocationStaff No.NameDec-12
India13242143213ANBUVEL BLALAJIEarn Leave
India21432142314AISHWEARYA RKDIASFDEarn Leave
India12343214321RAVEENA EDELVALVEarn Leave
India21343214123KRITHIKA MANIASFLASFDEarn Leave

 
Gunasekaran
You seems to duplicate second time Your thread.
Below is Your original:
You should add something new that others would be interesting.
This duplicated thread is closed too.
 
Status
Not open for further replies.
Back
Top