EXTRACT TEXT

excelbetter

Board Regular
Joined
Oct 13, 2010
Messages
190
I am trying to figure out how to extract text within a string of text in a cell.

Let's assume the string is in A1

The string is something like this:
http://media.domain.com/media/stock/thumb/design-21-hue.jpg

I am trying to extract the word "HUE" that appears before the period from the right side.

The word "HUE" might sometimes be a longer strong of text, not just 3 characters.

How do I do this and put the data I'm trying to extract in cell B1?

TY!!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
with Power Query

Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Between = Table.AddColumn(Source, "Result", each Text.BetweenDelimiters([source], "-", ".", {0, RelativePosition.FromEnd}, 0), type text),
    TSC = Table.SelectColumns(Between,{"Result"})
in
    TSC
sourceResult
http://media.domain.com/media/stock/thumb/design-21-hue.jpghue

btw. update your profile about Excel version, please ;)
 
Upvote 0
One way by formula:

20 07 03.xlsm
AB
1http://media.domain.com/media/stock/thumb/design-21-hue.jpghue
Extract
Cell Formulas
RangeFormula
B1B1=TRIM(LEFT(RIGHT(SUBSTITUTE(SUBSTITUTE(A1,".","-"),"-",REPT(" ",50)),100),50))
 
Upvote 0
Give this formula a try...

=TRIM(LEFT(RIGHT(SUBSTITUTE(SUBSTITUTE(A1,"-","."),".",REPT(" ",300)),600),300))
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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