Pull Characters Around a Certain Character

nguyenr85

New Member
Joined
Jan 21, 2018
Messages
2
So I'm trying to pull data from a set. The info I need is the numbers around a decimal.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Have[/TD]
[TD]Need[/TD]
[/TR]
[TR]
[TD]Intel Core 2.14 GHz[/TD]
[TD]2.14[/TD]
[/TR]
[TR]
[TD]AMD Core 1.99 GHz[/TD]
[TD]1.99[/TD]
[/TR]
[TR]
[TD]Intel Pentium 2.56 GHz[/TD]
[TD]2.56[/TD]
[/TR]
</tbody>[/TABLE]


I have been using the formula =MID(A1,FIND(".",A1,1),3) so I can get the numbers after the decimal but how can I get JUST the number before? Using LEFT function will not work because it just pulls from the beginning.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi - welcome to the board.

Assuming that (a) there's only one decimal in the string to worry about, and (b) processor power only goes up to 9:

=MID(A1,FIND(".",A1,1)-1,4)

...should do it.
 
Upvote 0
Hi,

If what you want is Always a single digit before decimal, and 2 digits after:


Excel 2010
ABC
1Intel Core 2.14 GHz2.14
2AMD Core 1.99 GHz1.99
3Intel Pentium 2.56 GHz2.56
Sheet6
Cell Formulas
RangeFormula
C1=MID(A1,FIND(".",A1)-1,4)


C1 formula copied down.
 
Last edited:
Upvote 0
nguyenr85,

Welcome to the MrExcel forum.

Try the following (the results will be numeric, not, text):

=TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",100)),200,100))+0
 
Last edited:
Upvote 0
Thanks for the reply and the welcome. It worked! I was missing the -1 in my formula. It makes sense now that I see it. Thanks again!
 
Upvote 0
nguyenr85,

Thanks for the feedback.

You are very welcome. Glad we could help.

And, come back anytime.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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