Find Digit in String

dgr

Board Regular
Joined
Apr 24, 2005
Messages
176
Hi,
I'm using Excel 2013. I'm looking for a VB macro solution for my problem.

I've got some text in column H. The text looks something like the 3 examples below.

some alphanumeric stuff 850 To 500 Sq.Ft. some alphanumeric stuff
some alphanumeric stuff 2300 Sq.Ft. some alphanumeric stuff
some alphanumeric stuff 2330 more alphanumeric stuff 2471 Sq.Ft.

From these examples, I want to extract:
500 Sq.Ft.
2300 Sq.Ft.
2471 Sq.Ft.

The common denominator here is the Sq.Ft. which is case insensitive. On the left of the Sq.Ft. there is a space. On the left of the space there is a string of numbers. There will NOT be any spaces in between the numbers.

I would like the extracted data to remain in the same cell in the same column.

I've seen some examples on this site but I don't know how to edit the examples to suit my needs as I am VBA illiterate.

Therefore, thank you very much for showing me the way.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Assuming the value wont go over 4-digits try

=MID(A4,FIND("Sq.Ft",A4)-5,5)+0
 
Upvote 0

Forum statistics

Threads
1,214,810
Messages
6,121,690
Members
449,048
Latest member
81jamesacct

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