Hi. I am new at writing VBA's. I have only learned little about them but I recently got a promotion and I believe I can put it to use now.

I am working on data that will be distributed to about 40 different people. Each person has a district (group of people in a range of cities/states) that they will need to look at. Is there a way I can have a VBA ask for "District", they type in the district and only pulls up data from that district. If this isn't possible I will have to separate each district and send 40 different emails.

Thanks so much!

Tiffany C.

Sorry. My profile specifically states I can't help with VBA. I do some VBA, but not enough to be helpful with the code.

However, you must be aware that Excel security isn't considered very good, so you maybe should be emailing the different sheets to each. It would actually make smaller emails and increase security.

Ron de Bruin is the "king" of Excel emailing.

And here is the code you could use if you place the email address of each worksheet's recipient in cell A1 of their worksheet:

When Ron says--at the end of that article--it will delete the file, he means the SHEET that was separated from your big workbook for sending, not YOUR big workbook.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Anne Troy


Virtually all common questions about Microsoft Excel, including all versions. Help with formulas, functions, optimum data layout, and application management. Please: No VBA or macro questions.


I taught Advanced Microsoft Excel to the senior accountants at the Environmental Protection Agency. Let's hope they were listening.

Dreamboat on Word Office VBA: Macros You Can Use Today

Self-taught and worked with the best in Microsoft Office applications.

Awards and Honors
Microsoft Word MVP 2008

©2017 About.com. All rights reserved.