How to Send Auto-mail for Specific Column based on Column Value

gssachin

Board Regular
Joined
Nov 14, 2013
Messages
144
Hi,

I have an excel sheet which having 60 rows (aprrox. which will change every time) and 10 column of data
In Column 11 I have stored Location (i.e. "Class A", "Class B", "Class C" etc)

For example : Suppose Column 11 having 4 Categories then I want to send 4 emails, after selecting/filtering data for for each category.

Please help me....
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

gssachin

Board Regular
Joined
Nov 14, 2013
Messages
144
I have following macro but getting error "Application-defined or object-defined error"

Sub MACRO1()
Dim i As Integer
Dim R As Range
Set R = Sheets("PIVOT").Cells


For i = 2 To 6


Range("B1").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("LOCATION").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("LOCATION").CurrentPage = _
Sheet2.Range("A" & i).Value


ActiveWorkbook.EnvelopeVisible = True


With R.Parent.MailEnvelope.Item
.To = Sheet1.Range("B" & i).Value
.cc = ""
.bcc = ""
.Subject = "Various allowance paid"
.send
End With


Next i


End Sub

can anybody help on this....
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,601
Messages
5,838,287
Members
430,537
Latest member
Antonio11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top