Hello everyone,
I have an excel file with information (Test file attached) and I would like to copy the information that appears in column B with his price (numbers in column C).
I have tried to develope a code but I do not know where to put the offset to copy the data from column C, and I think I would appreciate if some of you can take a look to the code construction.
Thank you.
HTML
Dim c As Range
Dim FirstAddress As String
Dim Tbl() As Variant
Dim k As Integer
Dim i As Integer
Dim ABCtyp As String
ABCtyp = "abc"
k = 0
With Worksheets("Hoja24").Columns("B")
Set c = .Find(ABCtyp, LookIn:=xlValues)
If Not c Is Nothing Then
FirstAddress = c.Address
Do
k = k + 1
ReDim Preserve Tbl(1 To k, 2)
Tbl(k, 1) = c
Tbl(k, 2) = c.Address
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> FirstAddress
End If
End With
For i = 1 To k
MsgBox Tbl(k, 1)
Next i
End Sub
Display More