IF Statement the return cell value

lemonap618

New Member
Joined
Oct 26, 2012
Messages
33
Greetings all,
I'm struggling with an IF statement.
I need it to do the following:
  • take the last name (last text string) in cell i2
  • take that value and look in column E
  • if the value is contained in column E, return the value from the cell

Please feel free to ask questions if I'm being vague or hard to follow.

Much thanks,
Andrew
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
you could try:
=IF(COUNTIF(E:E,RIGHT(I2,(LEN(I2)-SEARCH(" ",I2,1))))>0,INDEX(E:E,MATCH(RIGHT(I2,(LEN(I2)-SEARCH(" ",I2,1))),E:E,0),0),"")
 
Upvote 0
HHmmm. I get a blank cell.
To clarify, I have a list of salespeople's first and last name in column "i". I have e-mail addresses in column "e". I need an IF statement to pull the last name of the salesperson in column "i" and return the e-mail address found in column "e" if the e-mail address contains the last name of the salesperson.

I hope I'm not being too confusing.
Cheers,
Andrew
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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