billyheanue
Board Regular
- Joined
- Jul 13, 2015
- Messages
- 109
Hi all,
I am trying to resize the range A5 into a different amount of rows, with only 1 column wide.
The cell located in coordinates [13,6] holds a value that contains the number of rows I want the range resized to.
I tried using Cells(13,6).value to accomplish this, but running it is giving me an error, and I think my syntax is all messed up.
Can anyone help me out?
Thanks!
I am trying to resize the range A5 into a different amount of rows, with only 1 column wide.
The cell located in coordinates [13,6] holds a value that contains the number of rows I want the range resized to.
I tried using Cells(13,6).value to accomplish this, but running it is giving me an error, and I think my syntax is all messed up.
Code:
Private Sub CommandButton5_Click()
Range("A5").resize(Cells(13,6).value),1).Formula = "=VLOOKUP(Sheet1!B16,Sheet2!" _
& Sheets("Sheet2").Range("A4").CurrentRegion.Address & ",Sheet1!G$13,FALSE)"
End Sub
Can anyone help me out?
Thanks!