Hello and hoping everyone is doing well! I'm still a bit of a novice with programming and something I always struggle with is arrays. I've tried re-working some other examples of code I've found online but have not been able to do what I'm after and was hoping for some assistance.
If you look at the attached image or the attached file, I'd like to leverage the orange-colored table to put some information together for me in order to send an email to the "POC". I already have the creation of the MS Outlook email down just fine, but I would like this specific worksheet to do the following:
If a POC from column T of the orange table has the text "Send Email" in column V, I need a macro to create an array. The macro would have to first find any employee(s) (any row) with that specific POC in column O, where the text in Q2 also says "Send Email". If both conditions are met, the names would be added to an array (separated with a semi-colon and a space, i.e.: "Doe, John; Watson Kelly; Thomas, George". If I can then place the value of that array into cell "Email!E44" [Worksheets("Email").Range("E44") of course] that would solve the majority of my needs. Additionally, for any employee (row) that met the criteria when the macro was run, could then have today's date (corresponding cell value = Date) placed in column R of that row, that would be absolutely amazing.
Screenshot:
Test File.jpg
If I then move on to clicking "Send Email" from column V of a different POC, then it would call the same macro to find any employees that match the supervisor name, where "Send Email" is also the value of column Q. Create the array, place in cell Email!E44, then put today's date in column R of these rows. A complete repeat of the originally-described needs.
Any guidance or help here would be hugely appreciated.... I've fumbled around for hours over the course of several days and I'm at a total loss still. Thanks so much!
Excel file:
Test File for Email.xlsm
Bookmarks