what is this function called?

skylinekiller

New Member
Joined
May 3, 2004
Messages
48
Good afternoon! Part of my problem with Excel is I don't know what the function is called that I want to do. I am currently working on a small sheet where I need the following:

If Column B has the word john, then I need Column D to show the email jon.doe, if Column B has the word Jane, then Column D needs to show a different email. There are only a handful of emails so I would like to place this in the initial function (not reference another cell"

Is this in IF function or a V-Look?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Assuming your list of email addresses are found somewhere in the workbook, in a vertical orientation (as all in Col A), then VLOOKUP is your choice.
 
Upvote 0
No, I had not plan on placing all the emails in there. Do I need to do that? I thought I can just write them in one funciton
 
Upvote 0
You can write the emails in the Macro Code if you wish. And you can use the IF function.
 
Upvote 0
I thought I can just write them in one funciton
You can. This assumes that every name in column B will appear in the formula. If it is possible that other names, not in your formula could be in column B then a slightly different approach would be needed.
With this formula the list of names in the first curly brackets in the formula must be in alphabetical order.

21 04 12.xlsm
ABCD
1
2Johnjohnboy@gmail.com
3Janejane@elsewhere
4Kenkenneth@there
5Bobbob@somewhere
Lookup emails
Cell Formulas
RangeFormula
D2:D5D2=LOOKUP(B2,{"Bob","Jane","John","Ken"},{"bob@somewhere","jane@elsewhere","johnboy@gmail.com","kenneth@there"})
 
Upvote 0
Solution
Thank you. This pretty much solved the question, although I don't think it's as practical as I first thought. For educational purposes, what is the correct title of this function/formula? Is it just look up or Lookup array?
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,042
Members
449,063
Latest member
ak94

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