Extract name from cell formula

orsm6

Active Member
Joined
Oct 3, 2012
Messages
496
Office Version
  1. 365
Platform
  1. Windows
Hi all, i have a massive list Column B containing a string of text. How can I extract only the name that is in the cell?

if it helps, every single row in column B begins with last name, first name then the word 'was'.
it basically looks like this: Citizen, John was granted access

thinking about it, i would like to go one step further. how can i get the last name in column C and first name in column D?
example
Occurrence TimeEvent Full DescriptionLastFirst
1/06/2020 12:00:21 AMCitizen, John was granted accessCitizenJohn


it also looks like the raw data has two lines (in the formula bar) of text. like as if you press Alt+enter to get a second line

TIA
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I think that i might have to actually separate more of the data. i need the door number and description

this is the full string: Citizen, John was granted entry into 41 - Factory Entry through 41 - Factory Entry.
Occurrence TimeEvent Full DescriptionLastFirstDoorDescription
1/06/2020 12:00:21 AMCitizen, John was granted entry into 41 - Factory Entry through 41 - Factory Entry. Card number (14375)CitizenJohn41Factory Entry through 41
 
Upvote 0
Hi there. There may be more elegant ways, but this should do it:
Book1
ABCD
1Occurrence TimeEvent Full DescriptionLastFirst
201/06/2020 00:00Citizen, John was granted accessCitizenJohn
302/06/2020 00:00Citizen, John was granted accessCitizenJohn
403/06/2020 00:00Arthurian, Albert was a kingArthurianAlbert
504/06/2020 00:00Washington, George was a presidentWashingtonGeorge
Sheet1
Cell Formulas
RangeFormula
C3:C5C3=LEFT(B3,FIND(",",B3)-1)
D3:D5D3=MID(B3,FIND(",",B3)+2,FIND("was",B3,FIND(",",B3)+2)-FIND(",",B3)-3)
 
Upvote 0
One example is not much to go on. ;)
How do we logically determine the door number and description?

For the first couple, try ..

20 08 04.xlsm
BCD
1Event Full DescriptionLastFirst
2Citizen, John was granted entry into 41 - Factory Entry through 41 - Factory Entry. Card number (14375)CitizenJohn
Sheet2 (2)
Cell Formulas
RangeFormula
C2C2=LEFT(B2,FIND(",",B2)-1)
D2D2=REPLACE(LEFT(B2,FIND("was",B2)-2),1,LEN(C2)+2,"")
 
Upvote 0
Hi both.... thanks for your help. yeah sorry, I didn't want to copy people's names into here so only gave one example.

It is a bit messy, but i stumbled on converting text to columns. it essentially did the same thing, but not as neat haha.

thank you for your help.
 
Upvote 0
I was able to manage to get the data with your formulas :)
 
Upvote 0

Forum statistics

Threads
1,215,231
Messages
6,123,754
Members
449,119
Latest member
moudenourd

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