Hello, all.
I'm working on code that will help my team with some of the reports they run. They run the report, which, due to some data integrity issues, pulls accounts that do not need to be worked. They will send an email out to a recipient, prompting them to clear the accounts from the queue.
Here's the rundown (all info is arbitrary and made up)
On the attached sheet, under column M, "File type", I need to see if any accounts are known as "Class B". If so, I need to email those files to another team to have the data corrected and keep them off of my report. There should already be a macro saved within this workbook (try Ctrl+Shift+G) that will accomplish this (when testing, you'll need to place your own email in the code), but I'll post the code below, just in case.
If there are no "Class B" accounts on the report, then nothing needs to get fixed, however, the code I'm currently using will still send an email with a blank report. I'd like to avoid this.
What I want, is to have the code to analyze and make a decision. If there are no Class B accounts, then don't send an email, and move on to the next section. If there are Class B accounts, then I need it to run the code that I already have, and send the email.
I've dug around and have dabbled a bit with "if/then/else" stuff, but haven't found anything yet that I've been able to utilize to help me accomplish what I'm hoping for.
Any help is greatly appreciated!
VBATest - if_thens.xls
Code:
Bookmarks