Pull data after specific text

Al99

New Member
Joined
Dec 12, 2020
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

I would like some help on trying to figure out how to perform the following:

In cell A1 I have the following format of data:
"Performance: Improvement
Performed by: Joe Bloggs"

Essentially, I would like to pull the text just after 'Performance:' part and also pull the text just after 'Performed By:'

This will help me understand if the text is left blank just after 'Performance:' & 'Performed By:'
There is no specific amount of characters that will be after the 'Performance:' & 'Performed By:', this will vary.

Any ideas on how this can be done?

Thanks in advance
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Maybe like this
Book1
EF
3Performance: ImprovementImprovement
4Performed by: Joe BloggsJoe Bloggs
Sheet1
Cell Formulas
RangeFormula
F3:F4F3=MID(E3,FIND(": ",E3)+1,LEN(E3))
 
Upvote 0
EDIT
you have an answer above

you should be able to use MID()

Is the bit after Performed by: Joe Bloggs" ALways the last part of the TEXT
for example -
=RIGHT(A2,LEN(A2)-FIND("by:",A2,1)-3)
will extract the Joe Blogs section
 
Last edited:
Upvote 0
Hi

Thank you for your updates and help.
So the data will be in the below format, both 'Performance:' and 'Performed by:' will always be there.
However the text after 'Performance:' and 'Performed by:' will always vary
E.G it could change to
'Performance: Decline
Performed by: Joe B'

The aim of this is to understand if the text has been left blank either between performance or performed by.

Thanks

Format of data:
1607797006570.png
 

Attachments

  • 1607796687664.png
    1607796687664.png
    4.1 KB · Views: 2
  • 1607796717165.png
    1607796717165.png
    3.4 KB · Views: 1
Upvote 0
=MID(A2,FIND(":",A2,1)+2,FIND("Performed",A2,1)-FIND(":",A2,1)-2)
and
=RIGHT(A2,LEN(A2)-FIND("by:",A2,1)-3)
should extract the data - then if blank how would it look
Performance: Performed by:
Will there just be a SPACE
OR nothing
Performance:Performed by:
You could use an Nested IF () to TEST
BUT would need to know possible permutations

Book1
ABC
1
2Performance: Improvement Performed by: Joe BloggsJoe BloggsImprovement
3
Sheet1
Cell Formulas
RangeFormula
B2B2=RIGHT(A2,LEN(A2)-FIND("by:",A2,1)-3)
C2C2=MID(A2,FIND(":",A2,1)+2,FIND("Performed",A2,1)-FIND(":",A2,1)-2)
 
Upvote 0
Thanks again for your help, if blank it would look like this (no spaces after the Performed: or Performed By:
1607800003756.png

1607800023804.png
 
Upvote 0
So if blank after the Performance: would be performed
If SO then heres a logic test just to see if there are entries after the TAGS Performance & Performed - Could be combined with the other formulas if you wanted to extract the data itself

Excel Formula:
=IFERROR(IF(AND(FIND("Performed",A3,1)=13,  RIGHT(A1,13)="performed by:"), "Nothing Entered",IF(FIND("Performed",A3,1)=13, "Nothing After Performance",IF(RIGHT(A3,13)="performed by:","Nothing After Performed","data Entered"))),"No Performance OR Performed in text")

Book1
ABC
2Performance: Improvement Performed by: Joe BloggsJoe BloggsImprovement
3Performance:Performed by: Joe BloggsNothing After Performance
4Performance: Improvement Performed by: Joe Bloggsdata Entered
5Performance: Improvement Performed by:Nothing After Performed
6No Performance OR Performed in text
7No Performance OR Performed in text
8No Performance OR Performed in text
Sheet1
Cell Formulas
RangeFormula
C2C2=MID(A2,FIND(":",A2,1)+2,FIND("Performed",A2,1)-FIND(":",A2,1)-2)
B2B2=RIGHT(A2,LEN(A2)-FIND("by:",A2,1)-3)
B3:B8B3=IFERROR(IF(AND(FIND("Performed",A3,1)=13, RIGHT(A1,13)="performed by:"), "Nothing Entered",IF(FIND("Performed",A3,1)=13, "Nothing After Performance",IF(RIGHT(A3,13)="performed by:","Nothing After Performed","data Entered"))),"No Performance OR Performed in text")
 
Upvote 0
You may also want to try 'Text to columns' in the data menu of excel, using the ":" as as the delimiter.
 
Upvote 0
More possible options.

20 12 13.xlsm
ABC
1PerformancePerformed By
2Performance: Improvement Performed by: Joe BloggsImprovement Joe Bloggs
3Performance: Performed by: Joe Bloggs Joe Bloggs
4Performance: Improvement Performed by:Improvement  
5Performance:Performed by:  
6Performance:Increasing Improvement Performed by:JBIncreasing Improvement JB
Extract Text
Cell Formulas
RangeFormula
B2:B6B2=TRIM(MID(A2,13,SEARCH("Performed",A2)-13))
C2:C6C2=TRIM(REPLACE(A2,1,FIND(":",A2,13),""))
 
Upvote 0
Since I missed the fact both text lines exist in the same cell, maybe this single formula also works
(if only I had let to avoid the repeated filterxlm part...)
Book1
ABC
1Performance: Improvement Performed by: Joe BloggsImprovementJoe Bloggs
2Performance: Performed by: Joe Bloggs Joe Bloggs
3Performance: Improvement Performed by:Improvement 
4Performance: Performed by:  
5Performance:Increasing Improvement Performed by:JBIncreasing ImprovementJB
Sheet1
Cell Formulas
RangeFormula
B1:C5B1=TRIM(MID(FILTERXML("<text><b>"&SUBSTITUTE($A1,CHAR(10),"</b><b>")&"</b></text>","/text/b["&COLUMNS($B$1:B$1)&"]"),FIND(":",FILTERXML("<text><b>"&SUBSTITUTE($A1,CHAR(10),"</b><b>")&"</b></text>","/text/b["&COLUMNS($B$1:B$1)&"]"))+1,250))
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,975
Members
449,200
Latest member
Jamil ahmed

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