Raghava@rock
Member
Hi Team,
I am looking for sample vba code which will provide me the value of Column B, while the text in column A matches with specific text which searching through ARRAY.
Currently below is the code i am using , if the edit can be made to the same that would great.
once the Find text is found in MyArray then need to get teh value that is there in column C.
I am looking for sample vba code which will provide me the value of Column B, while the text in column A matches with specific text which searching through ARRAY.
Currently below is the code i am using , if the edit can be made to the same that would great.
once the Find text is found in MyArray then need to get teh value that is there in column C.
Code:
Dim MyArray() As String
Dim n As Long
Dim i As Long
Dim IsThere As Boolean
Dim FindText As String
n = Sheets("Sheet1").Range("B65536").End(xlUp).Row
ReDim MyArray(1 To n)
For i = 1 To n
MyArray(i) = Range("B" & i).Text
Next i
FindText = "Name"
For i = 1 To n
If MyArray(i) = FindText Then
:Need to get the value in column c in the same row
Exit For
End If
Next i
Last edited by a moderator: