V
vtj
I have a sheet that I want to put formulas into. The formula that I want to
paste in is similar to +A2+B2-C2+D2 with the result going into E2. If I put
that into the E2 location, the following will paste that formula all the way
down the sheet after I insert a Do Loop:
Sub Macro6()
'
' Macro6 Macro
'
'
Range("N187").Select
Selection.Copy
Debug.Print (xlFormulas)
Range("N188").Select
Debug.Print (xlFormulas)
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
The Debug.Print always shows -4123 as the value even if I use a different
formula or have it in different columns or rows. I am using Excel 2007
running on XP.
What I want to do is be able to define a formula in the Macro/VBA that I
could then paste so that I could change the formula whenever I needed to
based on the sheet that I'm working with.
Any help will be greatly appreciated. Thanks.
paste in is similar to +A2+B2-C2+D2 with the result going into E2. If I put
that into the E2 location, the following will paste that formula all the way
down the sheet after I insert a Do Loop:
Sub Macro6()
'
' Macro6 Macro
'
'
Range("N187").Select
Selection.Copy
Debug.Print (xlFormulas)
Range("N188").Select
Debug.Print (xlFormulas)
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
The Debug.Print always shows -4123 as the value even if I use a different
formula or have it in different columns or rows. I am using Excel 2007
running on XP.
What I want to do is be able to define a formula in the Macro/VBA that I
could then paste so that I could change the formula whenever I needed to
based on the sheet that I'm working with.
Any help will be greatly appreciated. Thanks.