I have one Excel Datasheet which consists of details about a particular product. Here I have written a VB script which pinpoints to a particular product using the unique product name which I have assigned for all the individual products. When I run the below code:
Private Sub CommandButton23_Click()
Dim rngX As Range
Dim num As String
Set rngX = Worksheets("Sheet1").Range("A1:A10000").Find("CTPT", lookat:=xlPart)
num = rngX.Address
Range("$A$13:B" & Range("B2").End(xlDown).Row).Copy
Range("F1").PasteSpecial (xlPasteValues)
End Sub
Here in the above code I am getting where the Product "CTPT" is located, the address of the cell location is stored in "num". How can I assign the "num" cell address $A$13 in the range function so that I can select all the parameters related to that particular product and it will get copied and pasted in F1 cell.