adma
07-05-2018, 06:14 AM
Hi,
What do I need to change this code to so that is doesn't add my formula to R18 C1, but instead adds it to the first available cell in B: ActiveCell.FormulaR1C1 = "=NEW!R[-18]C[1]"
the formula I want to add to the cell will be: ='NEW'!C2 (basically I want to copy from NEW cell C2, and see that in another Sheet)
Sub new_1()
'
' new_1 Macro
'
'
Sheets("TEMPLATE").Select
Sheets("TEMPLATE").Copy After:=Sheets(8)
Sheets("TEMPLATE (2)").Select
Sheets("TEMPLATE (2)").Name = "NEW"
Sheets("Summary").Select
Dim foundBlank As Range
Set foundBlank = Range("B3:B1000").Find(What:="", lookat:=xlWhole)
foundBlank.Select
ActiveCell.FormulaR1C1 = "=NEW!R[-18]C[1]"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "='NEW '!R[-3]C[1]"
End Sub
What do I need to change this code to so that is doesn't add my formula to R18 C1, but instead adds it to the first available cell in B: ActiveCell.FormulaR1C1 = "=NEW!R[-18]C[1]"
the formula I want to add to the cell will be: ='NEW'!C2 (basically I want to copy from NEW cell C2, and see that in another Sheet)
Sub new_1()
'
' new_1 Macro
'
'
Sheets("TEMPLATE").Select
Sheets("TEMPLATE").Copy After:=Sheets(8)
Sheets("TEMPLATE (2)").Select
Sheets("TEMPLATE (2)").Name = "NEW"
Sheets("Summary").Select
Dim foundBlank As Range
Set foundBlank = Range("B3:B1000").Find(What:="", lookat:=xlWhole)
foundBlank.Select
ActiveCell.FormulaR1C1 = "=NEW!R[-18]C[1]"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "='NEW '!R[-3]C[1]"
End Sub