PDA

View Full Version : [SOLVED:] Send text in cell as email to address listed in sheet



tintilinti
02-09-2021, 03:12 AM
It's been years since I used VBA and I only have couple of days to do this so I decided to ask for help here.
Let's say I have a sheet that has some notes/messages in one column (A) and name of a person who should receive the message in other column (B). Then, I have two more columns that list names (C) and their email addresses (D). I'm trying to copy the message, compare the names (B and C) and, if name is found, send the message to their address. I've seen similar solutions but couldn't find exactly what I'm looking for, I hope I've explained it well, every help is appreciated. Thanks.

SamT
02-09-2021, 09:13 AM
WorksheetFunction.VLookup(B,C:D,2)

Put C:D into a dictionary to return Addresses by Name

Put B and A in a Dictionary and C and D intro another to compare the two Name Keys and return Addresses and messages by Name

Arrays AB and CD and loop thru both