Extract all text AFTER any one of 7+ phrases in a lookup Range

Akanddo

New Member
Joined
Oct 24, 2018
Messages
2
I use this website regularly and absolutely love the contentand presentation and always learn a new thing or two.


I thought I would be able to write the formulas I need formy unique situation by browsing the Message Board and Learn Excel Resources,and even a Google search or 25, but to no avail.

If someone would be so kind as to either offer assistance orpoint me in the right direction, I’d be most obliged and grateful!

I have one Excel workbook with one worksheet with one columnof data.


The data is a copy/paste from a website describing collegegraduates' new employment updates.

As such, I the challenge is this.


I have a bunch of 'employer updates' text copied from the website ad pasted into Sheet 1, Col. A, with each row containing 1 person's data.


The first part of each cell is ALWAYS the person's name followed by: a space then a "(".


The gradation year is ALWAYS after that ( and formatted as: '##,


After the comma is the person's college major.


Ex: John Smith ('91, Accounting) was promoted to...




I already have my formulas to extract the name (cell B2)...

=TRIM(LEFT(A2,FIND("(",A2,1)-2))


...and grad year (cell C2)...

=TRIM(MID(A2,FIND("'",A2,1)+1,2))

but now I need their Position/Title in cell D2 (and for each row thereafter). The position/title is usually prefaced by an introductory phrase like:


has a new position as
has been named
has joined
is now a
is/has been promoted to
was named


I had originally put that block of phrase data in cells J2-J7 and selected them all to define them as Range "TITLE".


I thought I could use a formula to extract all text in cell A2 coming AFTER any of those phrases if found in the Range TITLE to create col. D with their position/title.

The output would look like this:

COL A COL B COL C COL D

John Smith ('91, Accounting) was John Smith '91 Associate Vice-President...(etc)
promoted to Associate Vice-President
for Landmark Technology.

I can't figure out a way to do this. Am I going about it the wrong way? Is there an easier solution I am missing?



Please advise, and thanks in advance for any assistance anyone can offer; it is MOST appreciated!



Regards,
Ky


 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi,

Not sure if I'll be able to help, but need you to provide more sample data of various scenarios.
Also, after the Position/Title, your sample shows "for some company", is this to be included?
 
Upvote 0
A​
B​
C​
D​
E​
1​
Blurb
Job
Phrase
Len
2​
John Smith ('91, Accounting) was promoted to Associate Vice-PresidentAssociate Vice-Presidentis now
6​
3​
John Smith ('91, Accounting) has a new position as Associate Vice-PresidentAssociate Vice-Presidentis now a
8​
4​
John Smith ('91, Accounting) is now an Associate Vice-PresidentAssociate Vice-Presidentis now an
9​
5​
John Smith ('91, Accounting) was named Associate Vice-PresidentAssociate Vice-Presidentwas named
9​
6​
John Smith ('91, Accounting) is now Associate Vice-PresidentAssociate Vice-Presidenthas joined
10​
7​
has been named
14​
8​
is promoted to
14​
9​
was promoted to
15​
10​
has been promoted to
20​
11​
has a new position as
21​

The formula in B2 is

=LOOKUP("zzz", MID(A2, FIND($D$2:$D$11, A2) + LEN($D$2:$D$11) + 1, 99))

Phrases are sorted by length.
 
Upvote 0
That wouldn't address the issue of a company name following.
 
Upvote 0
See attached sample Excel file data for a few rows below. It's not exact and the phrases I listed are the most common, but not a finite list. The text following the name, year, and major also vary in content.

My purpose is to extract the name, grad year, position/title, and possibly employer name which follows, but I am not sure this can be done reliably or at all, so I might just have to do it manually (which takes a longer time).


Copied/Pasted Text from Website Name Extracted Grad Yr Extracted Position Company
John Doe ('91, Accounting) was promoted to associate vice president of development at FSU. He has worked at FSU since 2011 and previously served as assistant vice president of development. John Doe 91
Sally Smith ('13, Finance) is now a senior consultant at Gov Relations, Inc. in Washington, D.C. and also is beginning law school. The former 25 Under 25 honoree began her career with Cooley Law Group and later worked as a senior operations analyst with U.S. Special Operations Command. Sally Smith 13
Bob Falter ('90, Accounting) was named partner and vice president of Finance for AECOM. A certified public accountant with 24 years of experience, Falter is a member of the Florida Institute of Certified Public Accountants. Bob Falter 90
Bill Willam ('82, Marketing) was promoted to senior vice president of National Sales for Keller Williams. Willam has spent over 30 years in the real estate industry and will oversee the sales and production areas within the company. Bill Willam 82
Rick Forest ('16, MAcc) has a new position as business analyst at The Charitable Hospital. He has moved to Ontario, Canada and recently received a post-graduate diploma in business intelligence systems infrastructure. Rick Forest 16
Humberto Halla ('15, Management, Marketing) has been promoted to senior product manager at Viacom. He has been with the company since 2015, beginning his career as a software intern. Humberto Halla 15

<colgroup><col><col><col></colgroup><tbody>
</tbody>

Hi,

Not sure if I'll be able to help, but need you to provide more sample data of various scenarios.
Also, after the Position/Title, your sample shows "for some company", is this to be included?
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,855
Members
449,096
Latest member
Erald

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