I am searching for a string using below code
For x = 2 To lastrow
If Sheets("sheet1").Cells(x, 3) = TFMODE Then
.......
'TFMODE is the string discussed
'This particular string "TFMODE" is randomly recurring throughout
'sheet in column 3.
I need to know position for a particular string in sheet1 Then autofill data which is beneath that string position in sheet2
答案 0 :(得分:0)
One way:
Sub qwerty()
lastrow = 10
For x = 2 To lastrow
If InStr(Sheets("Sheet1").Cells(x, 3), "TFMODE") > 0 Then
MsgBox Sheets("Sheet1").Cells(x, 3).Address(0, 0)
End If
Next x
End Sub