ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Setting up a formula HELP (https://www.excelbanter.com/excel-worksheet-functions/116270-setting-up-formula-help.html)

SuperRy

Setting up a formula HELP
 
I have a cell that can have more than 7 names in it. I would like another
cell (in the same row) to read that cell and return a specific email address
based on the name. I had it working with a rather long winded IF statement,
but we have more than 7 possible names. Is there another approach I should
take? These email addresses will be used by VBA to send out email reminders
to the people identified.

PCLIVE

Setting up a formula HELP
 
Setup a table with your names and email addresses in it. For example:

Starting in column Y, enter all of your names.
In Column Z, enter the appropriate email address next to each name.

Sort both columns (alphabetically ascending order) by column Y.

Then use a VLOOKUP function.

If your name to return an email address is in A1, enter this formula in B1.

=VLOOKUP(A1,Y:Z,2)

HTH,
Paul





"SuperRy" wrote in message
...
I have a cell that can have more than 7 names in it. I would like another
cell (in the same row) to read that cell and return a specific email
address
based on the name. I had it working with a rather long winded IF
statement,
but we have more than 7 possible names. Is there another approach I should
take? These email addresses will be used by VBA to send out email
reminders
to the people identified.





All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com