MATCH or Macro? Populate Email Address Based On Data in Column

kraamerica

Board Regular
Joined
Apr 7, 2020
Messages
56
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
I have a sheet where the data changes daily based on certain parameters (overdue dates). I need a way to pull the email address associated with the data in the specific column (cell) to populate in another column in the same row so that I can send a specific email to specific people instead of a blanket to over 180 locations (and obviously have to go through and try to find their email address from memory or one at a time).

I can put all the email data in one sheet and just copy the daily sheet I receive if that's easiest. I'm not sure what data I can show or send to this forum for an example. Is a screenshot the best way? or the excel sheet itself?

Column A is an associated code, B is the Name of the location that I need the email address mapped to (or vice versa). C-G contain dates/reference numbers.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
So I would like to try and use a match or macro so that when the data in column B is copy/pasted/entered, that it's corresponding email address automatically populates Column I

1589288939287.png
 
Upvote 0
Can you share a sample of the sheet where the emails are stored? What's the sheet name?
 
Upvote 0
Workbook of the screenshot above is searchdisplayinventory. The email addresses are just kept in a contact sheet right now titled 2020 April MI_OH_NY Dealers District 6102 (but can be changed to whatever as I was hoping to just have a master template of the searchdisplayinventory where I would copy current data over to if I need to keep and update the contacts on a separate sheet in that master template (which can also be called whatever). Here is the contact sheet example:

1589309321276.png
 
Upvote 0
Not sure if this is what you are looking for but maybe try this:

=INDEX('2020 April MI_OH__NY Dealers'!$B$2:$K$1000,MATCH(A2,'2020 April MI_OH__NY Dealers'!$A$2:$A$1000,0),MATCH($I$1,'2020 April MI_OH__NY Dealers'!$B$1:$Z$1,0))

$I$1 value = EMAIL
A2 value = Dealer Number

See attached photos.
 

Attachments

  • help2.png
    help2.png
    63.2 KB · Views: 15
  • help3.png
    help3.png
    58 KB · Views: 14
Upvote 0
OK thank you. So, long story short, I am referencing the workbook with the contacts and my master template will contain that reference =INDEX('2020 April MI_OH__NY Dealers'!$B$2:$K$1000,MATCH(A2,'2020 April MI_OH__NY Dealers'!$A$2:$A$1000,0),MATCH($I$1,'2020 April MI_OH__NY Dealers'!$B$1:$Z$1,0))

As long as the contact sheet maintains correct email address WITH the dealer number, it will always return what is populated in those 2 columns?

And if I created a master contact list I just change the reference workbook and sheet name in the formula above?
 
Last edited:
Upvote 0
Not sure if this is what you are looking for but maybe try this:

=INDEX('2020 April MI_OH__NY Dealers'!$B$2:$K$1000,MATCH(A2,'2020 April MI_OH__NY Dealers'!$A$2:$A$1000,0),MATCH($I$1,'2020 April MI_OH__NY Dealers'!$B$1:$Z$1,0))

$I$1 value = EMAIL
A2 value = Dealer Number

See attached photos.

FREAK YEAH! Real test will be tomorrow, but I get the gist and the rest this lowly wannabe can handle (maybe!) :). Thanks so much!
 
Upvote 0
An alternative solution would be to bring both tables into Power Query/Get and Transform and merge the two tables joined on the DLR Name and Name fields to get the email address. If you would like to see this solution, then instead of pictures (I cannot manipulate pictures), load each sample table to this site using XL2BB.
 
Upvote 0

Forum statistics

Threads
1,215,053
Messages
6,122,882
Members
449,097
Latest member
dbomb1414

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