How do I email a worksheet that uses names and Vlookup fields to just the selected individuals?

horartor

New Member
Joined
Feb 18, 2011
Messages
3
I have a worksheet that in cell A2 has a list of names that is referenced though a data validation list on another sheet that has the data. The rest of the sheet uses Vlookup to reference the name selected to provide that persons information. There are some other static Vloookup information for region and all region then some formulas that calculate different things. There are also Condition Formatting on some cells and the Icing on the cake is a 3 line Chart with Markers that also change per the selection of the A2 cell. I can add a vlookup to add the email address on the sheet, but that is not currently in there.


I am a beginner when it comes to VBA and learn more every day but I do not know how to do what I am being asked. Simply I need to send an email to every person on the list with only the name that is selected so that person only sees their results. I need to be able to do this with out the data for the named data or the Vlookups coming up with reference errors and more or less a copy paste Value approach on to a single page for each name. I have 4 regions with approximately 30-50 people on each so I need it to reference the active sheet. I know how to make it change to different sheets.


I don’t know how to have the script run though the list of referenced names in cell A2 and then copy that information to a temporary sheet that emails the referenced email say on cell A105 and send it while not loosing the information that is on that sheet and making it stop properly when it gets to the end of the list.


If this is helpful the data sheet is simply rows of names and columns from 1-39 each cell has a number in it from 0-5 or fraction there of. The name Reference takes the list of just the names and then most the VLookups reference A2 the other data has the region and region totals in a similar format and use name references for each of the 4 regions as well as the all regions total and then uses that in a VLookup referencing the Name then the column needed. The Chart is done by making cell A100 =A2 then using Vlookup for all the column fields then the regional and all regions are in there as static data for that char and are simply hidden by making them white on a white background.

Hopefully have explained it well enough for someone to help me with this. If not please let me know.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Start by looking at the Tutorial DataPig website they have a tutorial you can follow about sending emails from Excel and use specific lists etc and to each person.

Here is a link search down the list until you find

Send Emails with SENDEMAIL method
 
Upvote 0
Thank you.

There are 2 problems I tried it out on a test email and it send the whole workbook and not the sheet. I can only let them see thier data not have it to be able see anyone elses.

Also how would I have the code select the drop down Data valadation cell that uses named referrrence list since there is technicaly not a "" field to end the sub on. Even when recording a macro to see what it is called I can switch between all the names all day long and the macro show that I did not do anything...

If it would help I can copy what I have with generic data and save it somewhere so you can download it to see what I am talking about.
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

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
Back
Top