I'm trying to create a macro to copy and paste a certain section of a row to another sheet. I'm getting the user to input the row they want the copy/paste to work from.
I've created a variable (Dim c
) for the user to input the row value, and want to use that variable in a range, but don't know how.
E.g.
Range("C5:I5").Copy Range("C45:I45")
In the first step of this I want the '5' to be replaced by variable c
, but how do I call that variable in this statement?
Tried Range("C(Val(c)):I(Val(c))")
, but that hasn't worked.
Apologies for rookie errors, but I'm fairly new to VBA.