Extract the value between 2 spaces in a string

Shind1

New Member
Joined
Aug 14, 2009
Messages
18
Hi,

I have some text in a single cell (example below) but want to extract the "-3000" value form it. So essentially the value/text between the 1st and 2nd space.

Is there a simple method of doing this

Pay -3000 house gas

Thanks
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Maybe...

Excel 2010
ABCDE
1Pay -3000 house gas-3000TRUE

<colgroup><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+2)-(FIND(" ",A1)+1))*1
E1=ISNUMBER(B1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

 
Upvote 0
=mid(a1,find(" ",a1)+1,find(" ",a1,find(" ",a1)+1)-find(" ",a1))
 
Upvote 0
Maybe...

Excel 2010
ABCDE
1Pay -3000 house gas-3000TRUE

<colgroup><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1


Worksheet Formulas
CellFormula
B1=MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+2)-(FIND(" ",A1)+1))*1
E1=ISNUMBER(B1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
I have to do something similar but from the right

My text strings look like this

2 X WOODEN CARVED ORIENTAL FIGURINES 1 50.00 50.00 0.00
CANTEEN OF EPNS CUTLERY 1 300.00 300.00 0.00
CRYSTAL DECANTER 1 225.00 225.00 0.00
SET BONE HANDLED BUTTER KNIVES 1 275.00 275.00 0.00

I would like to extract the the first number after the 0.00 at the end of the string between the two spaces; thus respectively
50.00
300.00
225.00
275.00

as amounts
 
Upvote 0
@fransb99
Please start a thread of your own for this question.

I would also suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0

Forum statistics

Threads
1,215,615
Messages
6,125,857
Members
449,266
Latest member
davinroach

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