Look at column to see if there's an email address...

thp510

Board Regular
Joined
Oct 19, 2015
Messages
110
Office Version
  1. 365
Platform
  1. Windows
I have hundreds of rows of data in one column (Column A) that has either a name or an email address. I want to find a function that says IF there's an email address, do a vlookup to get the persons name (found on another table), otherwise don't do anything and just show me the name that's already listed in column A. ​Anyone have any advice? Thanks!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Any chance of a small set of dummy sample data and expected results?
 
Upvote 0
Actually, is this what you want?

Formula copied down.

Excel Workbook
ABCDE
1
2Name 1Name 1abc@def.comName 101
3Name 2Name 2jjj@kkk.sssName 102
4Name 3Name 3tom.jones@somewhere.com.ukName 103
5abc@def.comName 101
6Name 4Name 4
7Name 5Name 5
8tom.jones@somewhere.com.ukName 103
Lookup name
 
Upvote 0
Where A1 is the cell you are looking for
Code:
=if(ISNUMBER(SEARCH("@",A1))=true,vlookup(A1,[COLOR=#ff0000]tabble_array,column,[/COLOR]FALSE),A1)
 
Last edited:
Upvote 0
Where A1 is the cell you are looking for
Code:
=if(ISNUMBER(SEARCH("@",A1))=true,vlookup(A1,[COLOR=#ff0000]tabble_array,column,[/COLOR]FALSE),A1)

Hi Kamolga, I tried this and I'm getting an error. I even tried
Code:
=if(ISNUMBER(SEARCH("@",A1))=true, "Yes- True","Nope - False")
[/QUOTE]

I even did this:
Code:
=if(ISNUMBER(FIND("@",A1))=true, "Yes- True","Nope - False")
[/QUOTE]

Still just get the #N/A error response. Is '=TRUE' a valid command? Of note, I'm using Google sheets for now.
 
Upvote 0
I know nothing about google sheets but in excel instead of table array, you have to put the cells where the table is, like $C$1:$D$100 (or a name if you named the range) and instead of column, the number of the column in the table where the output is (the input is always on first), so 2 if the address is in C and the name is in D.

Code:
[LEFT][FONT=monospace][LEFT][COLOR=#333333][FONT=monospace][I]=if(ISNUMBER(SEARCH("@",A1))=true,vlookup(A1,[/I][/FONT][/COLOR][COLOR=#222222][FONT=Verdana]$C$1:$D$[/FONT][/COLOR]100[I][COLOR=#ff0000][FONT=monospace],2,[/FONT][/COLOR][FONT=monospace]F[/FONT][COLOR=#333333][FONT=monospace]ALSE),A1)[/FONT][/COLOR][/I][/LEFT]
[/FONT][/LEFT]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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