Quick way to convert fraction to decimal

cccbzg

Board Regular
Joined
Oct 5, 2014
Messages
68
Office Version
  1. 365
Platform
  1. Windows
Hi,

I frequently get data in the format below. I need it to be a fraction. What I usually do is use "text to columns" and work from there. Is there an easier way?

Thanks in advance!
Bonnie
37 / 78
52 / 78
50 / 78
48 / 78
20 / 78
47 / 78
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
What version of Excel are you using?

I 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
What version of Excel are you using?

I 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’)
Done! Thanks for the advice.
 
Upvote 0
The results are formatted as fraction.
The second solution uses Evaluate which can work with + - ^ etc.

Lambda DGP.xlsm
ABC
2237 / 781/21/2
2352 / 782/32/3
2450 / 782/32/3
2548 / 785/85/8
2620 / 781/41/4
2747 / 783/53/5
1g
Cell Formulas
RangeFormula
B22:B27B22=TEXTBEFORE(A22," / ")/TEXTAFTER(A22," / ")
C22:C27C22=EvalCell(A22)
 
Upvote 0
Yes, there is an easier way to convert the data to fractions without using the "text to columns" feature.

You can use the SUBSTITUTE function to replace the space between the numbers with a division symbol ("/"), and then use the VALUE function to convert the resulting text string to a number. For example, assuming the first data point is in cell A1, you can use the following formula in cell B1 to convert it to a fraction:

=VALUE(SUBSTITUTE(A1," ","/"))

This formula first replaces the space character with a division symbol using the SUBSTITUTE function, and then converts the resulting text string to a number using the VALUE function. You can then copy this formula down to convert all the data points to fractions.

This method is much faster and more efficient than using "text to columns" and can handle large amounts of data with ease.
 
Upvote 0
Yes, there is an easier way to convert the data to fractions without using the "text to columns" feature.

You can use the SUBSTITUTE function to replace the space between the numbers with a division symbol ("/"), and then use the VALUE function to convert the resulting text string to a number. For example, assuming the first data point is in cell A1, you can use the following formula in cell B1 to convert it to a fraction:

=VALUE(SUBSTITUTE(A1," ","/"))

This formula first replaces the space character with a division symbol using the SUBSTITUTE function, and then converts the resulting text string to a number using the VALUE function. You can then copy this formula down to convert all the data points to fractions.

This method is much faster and more efficient than using "text to columns" and can handle large amounts of data with ease.
@GSP75 , don't understand how the substitute formula as you use above resolves to only one slash? by substituting " " with a / you will get ///, wont you?
 
Upvote 0
The results are formatted as fraction.
The second solution uses Evaluate which can work with + - ^ etc.

Lambda DGP.xlsm
ABC
2237 / 781/21/2
2352 / 782/32/3
2450 / 782/32/3
2548 / 785/85/8
2620 / 781/41/4
2747 / 783/53/5
1g
Cell Formulas
RangeFormula
B22:B27B22=TEXTBEFORE(A22," / ")/TEXTAFTER(A22," / ")
C22:C27C22=EvalCell(A22)
@Dave Patton , I don't understand how the fraction format is used in this situation. The value in A22 does not resolve to one-half?
 
Upvote 0
The question included "I need it to be a fraction" .
Format the information per your preference.

Lambda DGP.xlsm
ABCDE
20
21DecimalFraction as sixteenth
2237 / 7847.44%47.44%8/168/16
2352 / 7866.67%66.67%11/1611/16
2450 / 7864.10%64.10%10/1610/16
2548 / 7861.54%61.54%10/1610/16
2620 / 7825.64%25.64%4/164/16
2747 / 7860.26%60.26%10/1610/16
285 / 100.550.00%8/168/16
29
1g
Cell Formulas
RangeFormula
B22:B28B22=TEXTBEFORE(A22," / ")/TEXTAFTER(A22," / ")
C22:C28C22=EvalCell(A22)
D22:D28D22=TEXTBEFORE(A22," / ")/TEXTAFTER(A22," / ")
E22:E28E22=EvalCell(A22)
 
Upvote 0

Forum statistics

Threads
1,222,616
Messages
6,167,070
Members
452,093
Latest member
JamesFromAustin

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