Hello
I have some data in the column A , would like to convert it to L shaped Long in related cells.
Please hit the F8 to see what is happening!
Thank u.
I have some data in the column A , would like to convert it to L shaped Long in related cells.
Please hit the F8 to see what is happening!
Thank u.
Code:
Sub FillDataToL()
Range("A1").Select
ActiveCell.FormulaR1C1 = "W18"
Range("A1").Select
Selection.AutoFill Destination:=Range("A1:A20"), Type:=xlFillDefault
Range("A1:A20").Select
Columns("B:N").Select
Selection.ColumnWidth = 2.29
Range("C1:C10,D10,D10:N10").Select
Range("D10").Activate
ActiveWorkbook.Names.Add Name:="LongT", RefersToR1C1:= _
"=Sheet1!R1C3:R10C3,Sheet1!R10C4,Sheet1!R10C4:R10C14"
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Application.Goto Reference:="LongT"
Range("A1:A15").Select
Application.CutCopyMode = False
Range("A1:A20").Select
Selection.Copy
Application.Goto Reference:="LongT"
Range("C1").Select
Application.Goto Reference:="LongT"
Range("C1:C10,D10,D10:N10").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("C2").Activate
ActiveCell.FormulaR1C1 = "=RC[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("C3").Activate
ActiveCell.FormulaR1C1 = "=RC[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("C4").Activate
ActiveCell.FormulaR1C1 = "=R[1]C[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("C5").Activate
ActiveCell.FormulaR1C1 = "=R[1]C[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("C6").Activate
ActiveCell.FormulaR1C1 = "=R[1]C[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("C7").Activate
ActiveCell.FormulaR1C1 = "=RC[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("C8").Activate
ActiveCell.FormulaR1C1 = "=RC[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("C9").Activate
ActiveCell.FormulaR1C1 = "=RC[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("C10").Activate
ActiveCell.FormulaR1C1 = "=RC[-2]"
Range("C1:C10,D10,D10:N10").Select
Range("D10").Activate
ActiveCell.FormulaR1C1 = "=R[1]C[-3]"
Range("C1:C10,D10,D10:N10").Select
Range("D10").Activate
ActiveCell.FormulaR1C1 = "=R[2]C[-3]"
Range("C1:C10,D10,D10:N10").Select
Range("E10").Activate
ActiveCell.FormulaR1C1 = "=R[4]C[-4]"
Range("C1:C10,D10,D10:N10").Select
Range("F10").Activate
ActiveCell.FormulaR1C1 = "=R[5]C[-5]"
Range("C1:C10,D10,D10:N10").Select
Range("G10").Activate
ActiveCell.FormulaR1C1 = "=R[6]C[-6]"
Range("C1:C10,D10,D10:N10").Select
Range("H10").Activate
ActiveCell.FormulaR1C1 = "=R[6]C[-7]"
Cells.Select
Cells.EntireColumn.AutoFit
Range("E14").Select
ActiveWindow.SmallScroll Down:=-75
Range("A1").Select
ActiveCell.FormulaR1C1 = "a"
Range("A2").Select
ActiveCell.FormulaR1C1 = "s"
Range("A3").Select
ActiveCell.FormulaR1C1 = "s"
Range("A4").Select
ActiveCell.FormulaR1C1 = "s"
Range("A5").Select
ActiveCell.FormulaR1C1 = "s"
Range("A6").Select
ActiveCell.FormulaR1C1 = "s"
Range("A7").Select
ActiveCell.FormulaR1C1 = "s"
Range("A8").Select
ActiveCell.FormulaR1C1 = "s"
Range("A9").Select
ActiveCell.FormulaR1C1 = "s"
Range("A10").Select
ActiveCell.FormulaR1C1 = "s"
Range("A11").Select
ActiveCell.FormulaR1C1 = "s"
Range("A12").Select
ActiveCell.FormulaR1C1 = "s"
Range("A13").Select
ActiveCell.FormulaR1C1 = "s"
Range("A14").Select
ActiveCell.FormulaR1C1 = "s"
Range("A15").Select
ActiveCell.FormulaR1C1 = "s"
Range("A16").Select
ActiveCell.FormulaR1C1 = "s"
Range("A17").Select
ActiveCell.FormulaR1C1 = "s"
Range("A1").Select
End Sub