Text Forumla error

krzysiek

New Member
Joined
Apr 7, 2013
Messages
14
Hi All,

Hope any of You can help me with below formula?

I am having a problem with creating the formula that returns name and surname when it is in table, and on few occasions there might be an e-mail address (Name.Surname@companyname.com) in this sitation the formula should extract name and surname from e-mail address.

I already created this formula
=IF(ISERROR(FIND("@",VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0),1)),VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0),PROPER(LEFT(VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0),FIND(".",VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0))-1)&" "&PROPER(MID(VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0),FIND(".",VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0))+1,FIND("@",VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0))-FIND(".",VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0))-1))))

it works to some extent,
when formula finds @ character both IF conditions are correct, but when it does not find @ character the second condition PROPER(LEFT(VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0),FIND(".",VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0))-1)&" "&PROPER(MID(VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0),FIND(".",VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0))+1,FIND("@",VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0))-FIND(".",VLOOKUP(B7,'G''Fees Non-back up'!B:J,8,0))-1))) is rerutning error.

Possibly any of You have an idea how to correct this?


Thank You in advance,

Regards,

Krzysiek
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,224,392
Messages
6,178,316
Members
452,840
Latest member
Kbean

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