Hi all
I'm having a problem in extracting coordinates from a table after writting the name on a label.
Can anyone please help on this?
Thanks in advance!
Ana
My code is currently the following:
(N1 and N2 are the coordinates to extract from the table considering the words on userform1.label1.caption)
Sheets("sheet1").Select
Range("A1").Select
ncategories = WorksheetFunction.CountA(Columns("A:A"))
For i = 1 To ncategories
If Range("A1:A" & ncategories).Cells(i, 1) = UserForm1.Label1.Caption Then
Range("A" & i).Select
N1 = ActiveCell.Offset(UserForm1.Label11.Caption, 1)
N2 = ActiveCell.Offset(UserForm1.Label12.Caption, 2)
End If
Next i
I'm having a problem in extracting coordinates from a table after writting the name on a label.
Can anyone please help on this?
Thanks in advance!
Ana
My code is currently the following:
(N1 and N2 are the coordinates to extract from the table considering the words on userform1.label1.caption)
Sheets("sheet1").Select
Range("A1").Select
ncategories = WorksheetFunction.CountA(Columns("A:A"))
For i = 1 To ncategories
If Range("A1:A" & ncategories).Cells(i, 1) = UserForm1.Label1.Caption Then
Range("A" & i).Select
N1 = ActiveCell.Offset(UserForm1.Label11.Caption, 1)
N2 = ActiveCell.Offset(UserForm1.Label12.Caption, 2)
End If
Next i