Hi Sam
Yes, that works if you know that the fraction happens to be 2/7. However, I'm looking to find a way to automate the process for columns of many different fractions without having to type in each number manually.
Fortunately, I've been able to knock up a macro that will do what I want for 3 columns of fractions up to 100 cells long:
Range("C3:C100").Select
ActiveWindow.ScrollRow = 1
Selection.TextToColumns Destination:=Range("H3"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="/", FieldInfo:=Array(Array(1, 1), Array(2, 1))
Range("C3:D100").Select
ActiveWindow.ScrollRow = 1
ActiveWindow.SmallScroll Down:=75
Range("D3:D100").Select
Range("D100").Activate
Selection.TextToColumns Destination:=Range("J3"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="/", FieldInfo:=Array(Array(1, 1), Array(2, 1))
Range("E3:E64").Select
ActiveWindow.SmallScroll Down:=-45
Range("E3:E100").Select
ActiveWindow.ScrollRow = 1
Selection.TextToColumns Destination:=Range("L3"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="/", FieldInfo:=Array(Array(1, 1), Array(2, 1))
Columns("H:L").Select
Selection.NumberFormat = "0"
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
ActiveWindow.ScrollColumn = 3
Columns("M:M").Select
Selection.NumberFormat = "0"
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Range("N3").Select
ActiveCell.FormulaR1C1 = "=RC[-6]/RC[-5]"
Range("O3").Select
ActiveCell.FormulaR1C1 = "=RC[-5]/RC[-4]"
Range("P3").Select
ActiveCell.FormulaR1C1 = "=RC[-4]/RC[-3]"
Range("N3:P3").Select
Selection.Copy
Range("N4:P100").Select
ActiveSheet.Paste
Columns("N: P").Select
Application.CutCopyMode = False
Selection.NumberFormat = "0.00"
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Range("N3").Select
End Sub
Gill