• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Filter Table and send to filtered values a table as atachment to Oulook |VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Filter Table and send to filtered values a table as atachment to Oulook |VBA & Macros|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosFilter Table and send to filtered v…
sp_PrintTopic sp_TopicIcon
Filter Table and send to filtered values a table as atachment to Oulook
Avatar
Marko Meglic
Member
Members
Level 0
Forum Posts: 13
Member Since:
March 22, 2023
sp_UserOfflineSmall Offline
1
April 14, 2023 - 10:46 pm
sp_Permalink sp_Print

HI All

Again i need some help because i can´t find any useful answers on the net.

Problem:

Filter table in column A and then send the filtered table to the address in separate sheet (DSP EMAILS) based on filtered values in column A. 

Ideally with the file name set as filtered value and the date from column E!

I lost a whole day searching for a solution. 😀

 

Macro for SORT is done. joust the mail macro is the tricky one

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 121
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
2
April 15, 2023 - 4:28 pm
sp_Permalink sp_Print

What is now your question?

I understand you have an issue but it's not clear from your question and there's nothing in the file explaining what you want en what the question is.

Don't make us guess what you want tell is what you're trying to achieve

Avatar
Marko Meglic
Member
Members
Level 0
Forum Posts: 13
Member Since:
March 22, 2023
sp_UserOfflineSmall Offline
3
April 17, 2023 - 7:34 pm
sp_Permalink sp_Print

The issue is when i run my macro it does a loop but also sends an email with attached excel to all the filtered values - that means that every value in the filtered data (DSP) gets an email and that means if there are 3 identical names with different values it sends out 3 mails.

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 121
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
4
April 18, 2023 - 4:12 pm
sp_Permalink sp_Print

Or I did not read your question correctly or you did not explain it correctly

You will need an extra loop in case there are more than one recipients in the SendTo cell

 

You can create an array loop using the ; as separator for each item.

If you don't know how let me/us know

Avatar
Marko Meglic
Member
Members
Level 0
Forum Posts: 13
Member Since:
March 22, 2023
sp_UserOfflineSmall Offline
5
April 18, 2023 - 7:41 pm
sp_Permalink sp_Print

So if you run now my send code it will generate 5 emails instead of joust 3 for each DSP. it generates as many emails as there are rows

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 121
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
6
April 19, 2023 - 4:35 pm
sp_Permalink sp_Print

If I take a look at your file (the last one I have here) for each DSP:

Filter ASME will send 4 E-mails
Filter EGET will send 3 E-mails
Filter RAPK will send 4 E-mails

Avatar
Marko Meglic
Member
Members
Level 0
Forum Posts: 13
Member Since:
March 22, 2023
sp_UserOfflineSmall Offline
7
April 21, 2023 - 12:29 am
sp_Permalink sp_Print

Exactly and that is the problem.

Every filtered value should get only 1 excel sheet containing filtered data in it

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 121
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
8
April 21, 2023 - 4:24 pm
sp_Permalink sp_Print

You mention several mails but not how many attachments per mail.

Please be more specific else set the macro to save the mail instead of display or send, that way you can actually check wht's being sent.

 

When you select .Save the mail is saved in the Draft folder

Like I mentioned, I do not have Outlook installed locally so cannot test for you.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Rashid Khan
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 216
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Melanie Ford
Isaac Felbah
Adele Glover
Hitesh Asrani
Rohan Abraham
Anthony van Riessen
Erlinda Eloriaga
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Forum Stats:
Groups: 3
Forums: 24
Topics: 6356
Posts: 27793

 

Member Stats:
Guest Posters: 49
Members: 32324
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.