Turn fraction around

PabloFer

New Member
Joined
Sep 16, 2020
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
3,923
Office Version
  1. 365
Platform
  1. MacOS
i assume the fractions are Text format
If they are only 1 character
=RIGHT(A1,1)&"/"&LEFT(A1,1)
otherwise , would need to work out the length and where the / exists
IE
32/431

can you explain if the fraction will contain more than 1 character each side of the /

otherwise we need a find
=RIGHT(A1,LEN(A1)-FIND("/",A1,1))&"/"&LEFT(A1,FIND("/",A1,1)-1)
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,442
Office Version
  1. 365
Platform
  1. Windows
Welcome to the Board!

Are you just wanting to change the presentation of it, but want it to retain its former value?
(so should 3/1 actually have the value of 3 or 1/3)?

Are you trying to do anything math functions on it?
If not, you can just first format the cells as Text, and then when you enter 3/1, it will show it like that.
 

PabloFer

New Member
Joined
Sep 16, 2020
Messages
12
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Thank you, there is a lot of lines I need to change they will not exceed 2 characters on each side. What I need to do is take the result of a division which is in fraction format and turn around, for example my result is 1/3 or 1/10 and I need to present inverted like 3/1 or 10/1
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,442
Office Version
  1. 365
Platform
  1. Windows
Can you post a small sample of your data,, so we can see exactly what it looks like?
You can post Excel images using the tool mentioned here: XL2BB - Excel Range to BBCode
 

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
3,923
Office Version
  1. 365
Platform
  1. MacOS

ADVERTISEMENT

did my suggestion work?
=RIGHT(A1,LEN(A1)-FIND("/",A1,1))&"/"&LEFT(A1,FIND("/",A1,1)-1)

Book1
AB
132345/34563456/32345
Sheet1
Cell Formulas
RangeFormula
B1B1=RIGHT(A1,LEN(A1)-FIND("/",A1,1))&"/"&LEFT(A1,FIND("/",A1,1)-1)
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
6,698
with Power Query
sourceresult
1/33/1
3/5050/3
56/2828/56
1/1010/1

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table15"]}[Content],
    Text = Table.TransformColumnTypes(Source,{{"source", type text}}),
    Split = Table.SplitColumn(Text, "source", Splitter.SplitTextByDelimiter("/", QuoteStyle.Csv), {"source.1", "source.2"}),
    TCC = Table.CombineColumns(Table.TransformColumnTypes(Split, {{"source.2", type text}, {"source.1", type text}}, "en-GB"),{"source.2", "source.1"},Combiner.CombineTextByDelimiter("/", QuoteStyle.None),"result")
in
    TCC
 

PabloFer

New Member
Joined
Sep 16, 2020
Messages
12
Office Version
  1. 365
Platform
  1. Windows
[
did my suggestion work?
=RIGHT(A1,LEN(A1)-FIND("/",A1,1))&"/"&LEFT(A1,FIND("/",A1,1)-1)

Just tried, No it did not worked
 

Attachments

  • Forum.JPG
    Forum.JPG
    138.5 KB · Views: 7

Watch MrExcel Video

Forum statistics

Threads
1,108,729
Messages
5,524,488
Members
409,584
Latest member
RedHelp

This Week's Hot Topics

Top