Find and extract string from a cell text

eduzs

Well-known Member
Joined
Jul 6, 2014
Messages
704
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
I need a formula that finds and extract "month of 2020" in columns A.
Example:
Column A
1 Test
2 Hi
3 1
4 2
5 3
6 This , of course, is the month of december of 2020, ok.
7 Any text.
8 6
9 3
The formula should:
1) Find the cell that starts with "This, of course"; (the patern can appear anywhere in column A) = Row 6
2) Extract text from cell "A6" between the last "of" and the last ",", in this case = "december of 2020".
Is there a way to do that? Thanks.
 
You should never use whole column references in a MATCH function.
That said there is nothing wrong with what you have posted.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Is there a way to use MATCH if in the cell have more than 256 char? Like lookup only the first 20 characters of each cell.
 
Upvote 0
You could use
Excel Formula:
=MATCH("this",LEFT(A1:A2000,4),0)
 
Upvote 0
Thanks, works fine.
 
Last edited:
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
You're welcome & thanks for the feedback.
Now I know the cell to extract the text (A50).
How can I extract "december of 2020" from cell A50?
Cell A50 text:
"... x of december of 2015, y...."
Text betweem first "x of " and first ", y" backwards.
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,179
Members
448,871
Latest member
hengshankouniuniu

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