Fraction stored as text

SQUIDD

Well-known Member
Joined
Jan 2, 2009
Messages
2,104
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi all

I have been looking around on this issue.
Cannot seem to find a way forward.

I have fractions stored as text like 11 1/4.
Capture.PNG


When i use
=left(a1,1) is 1
=left(a1,2) is 11
=left(a1,3) is 1/4

is there a formula i can use to sort this out to output as 11.25?

Or pehaps UDF?

thanks all

please see image of how they are displayed

Dave
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
have a look of this

Hi Alan

Thanks for looking, but im afraid i have already tried to format these.

it would appear whatever i try to format to, does not change the outpot in the cell

dave
 
Upvote 0
If there is a space that separates the whole number from the fraction, then try this...
Excel Formula:
=IF(ISERROR(SEARCH(" ",A1)),LEFT(A1,SEARCH("/",A1)-1)/MID(A1,SEARCH("/",A1)+1,99),LEFT(A1,SEARCH(" ",A1)-1)+MID(A1,SEARCH("",A1)+1,SEARCH("/",A1)-1-SEARCH(" ",A1))/MID(A1,SEARCH("/",A1)+1,99))

Alternatively, select the column and use the Replace function (Ctrl+H) and replace a space character with a space character. Excel will then coerce the text into numbers. You may then change the cell formatting of the column from fraction to decimal as AlanY suggested.
 
Upvote 0
Hi Aplha frog

there is not a space between unfortunatly. Thanks for trying.
Basicall the cell for the 11 and 1/4 is
1st charracter is a 1
2nd characher is a 1
3rd charracter is 1/4(but actually the 1 is over the 4 as per the image.

Dave
 
Upvote 0
Hi,
Try this:
Wb1
AB
1TextNumber
211¼11.25
32.5
Sheet1
Cell Formulas
RangeFormula
B2:B3B2=--SUBSTITUTE(SUBSTITUTE(A2,"¼"," 1/4"),"½"," 1/2")
 
Upvote 0
Hi ZVI

You nailed it mate, worked perfectly. Thank you.

nice job and thanks everyone else that helped previously.

Dave
 
Upvote 0
ZVI

How can i also cover a 3/4" scenario.

thanks

dave
 
Upvote 0
no worries

=--SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(I3,"¼"," 1/4"),"½"," 1/2"),"¾"," 3/4")

thanks

dave
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,792
Members
449,048
Latest member
greyangel23

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