G
Guest
I have create a macro and when I go to the next cell and try to run the
Macro, it puts data in the first cell, but then goes to me original line of
data - it does not populate the rest of the 2nd row.
When I look at the macro, it seems to reference a specific cell. I need some
help.
Thanks,
Here is the macro:
ActiveCell.FormulaR1C1 = "=MID(RC[-2],3,14)"
Range("D3").Select
ActiveCell.FormulaR1C1 = "=MID(RC[-3],17,12)"
Range("E3").Select
ActiveCell.FormulaR1C1 = "=MID(RC[-4],29,10)"
Range("F3").Select
ActiveCell.FormulaR1C1 = "=MID(RC[-5],46,6)"
Range("G3").Select
ActiveCell.FormulaR1C1 = "=MID(RC[-6],52,4)"
Range("I3").Select
ActiveCell.FormulaR1C1 = "=RIGHT(RC[-6],5)"
Range("J3").Select
ActiveCell.FormulaR1C1 = "=+RC[-6]"
Range("K3").Select
ActiveCell.FormulaR1C1 = "=RC[-6]*1"
Range("L3").Select
ActiveCell.FormulaR1C1 = "=RC[-6]"
Range("M3").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-6]=""1000"",""LA"",IF(RC[-6]=""2000"",""Mex"",IF(RC[-6]=""3000"",""Brz"",IF(RC[-6]=""4000"",""Arg"",IF(RC[-6]=""5000"",""Boom"",IF(RC[-6]=""5600"",""Cartoon LA""))))))"
Range("N3").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-1]=""Arg"",(RC[-1]*Rate!R3C2),IF(RC[-1]=""Brz"",(RC[-3]*Rate!R4C2),IF(RC[-1]=""Mex"",(RC[-1]*Rate!R5C2),RC[-3])))"
Range("O3").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-2]=""Arg"",
""ARS"",IF(RC[-2]=""Brz"",""BRL"",IF(RC[-2]=""Mex"", ""MXN"",""USD"")))"
Range("C3:O3").Select
Range("O3").Activate
Selection.Copy
End Sub
Macro, it puts data in the first cell, but then goes to me original line of
data - it does not populate the rest of the 2nd row.
When I look at the macro, it seems to reference a specific cell. I need some
help.
Thanks,
Here is the macro:
ActiveCell.FormulaR1C1 = "=MID(RC[-2],3,14)"
Range("D3").Select
ActiveCell.FormulaR1C1 = "=MID(RC[-3],17,12)"
Range("E3").Select
ActiveCell.FormulaR1C1 = "=MID(RC[-4],29,10)"
Range("F3").Select
ActiveCell.FormulaR1C1 = "=MID(RC[-5],46,6)"
Range("G3").Select
ActiveCell.FormulaR1C1 = "=MID(RC[-6],52,4)"
Range("I3").Select
ActiveCell.FormulaR1C1 = "=RIGHT(RC[-6],5)"
Range("J3").Select
ActiveCell.FormulaR1C1 = "=+RC[-6]"
Range("K3").Select
ActiveCell.FormulaR1C1 = "=RC[-6]*1"
Range("L3").Select
ActiveCell.FormulaR1C1 = "=RC[-6]"
Range("M3").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-6]=""1000"",""LA"",IF(RC[-6]=""2000"",""Mex"",IF(RC[-6]=""3000"",""Brz"",IF(RC[-6]=""4000"",""Arg"",IF(RC[-6]=""5000"",""Boom"",IF(RC[-6]=""5600"",""Cartoon LA""))))))"
Range("N3").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-1]=""Arg"",(RC[-1]*Rate!R3C2),IF(RC[-1]=""Brz"",(RC[-3]*Rate!R4C2),IF(RC[-1]=""Mex"",(RC[-1]*Rate!R5C2),RC[-3])))"
Range("O3").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-2]=""Arg"",
""ARS"",IF(RC[-2]=""Brz"",""BRL"",IF(RC[-2]=""Mex"", ""MXN"",""USD"")))"
Range("C3:O3").Select
Range("O3").Activate
Selection.Copy
End Sub