VBABEGINER
Well-known Member
- Joined
- Jun 15, 2011
- Messages
- 1,284
- Office Version
- 365
- Platform
- Windows
Hey Guys,
Good Morning,
Following is the suprising code for mi.
The reason for suprising b'coz, the same code sometimes run and this code want itself to not run.
I didnt understand what this expected ffrom mi.
Fine..
I just simply copy and paste the value from one cell to another.
Col l contains - no. of values wherein, it also contains value named "PB".
now where ever col L contains "PB" it should get cut and paste to respective cell of Col M.
The following is the code only. But didint understand Y getting error.
And this error continuosly coming, pls any one kindly explain me Y this error coming
Run time error '1004'
Method 'Range' of object '_Global failed
Good Morning,
Following is the suprising code for mi.
The reason for suprising b'coz, the same code sometimes run and this code want itself to not run.
I didnt understand what this expected ffrom mi.
Fine..
I just simply copy and paste the value from one cell to another.
Col l contains - no. of values wherein, it also contains value named "PB".
now where ever col L contains "PB" it should get cut and paste to respective cell of Col M.
The following is the code only. But didint understand Y getting error.
And this error continuosly coming, pls any one kindly explain me Y this error coming
Run time error '1004'
Method 'Range' of object '_Global failed
Public Function FindJB()
Dim i
Dim j
i = Range("L11" & Rows.Count).End(xlUp).Row
'For i = 11 To Range("L11").End(xlDown).Row
For j = 11 To i
If Left(Cells(j, 12), 2) = "JB" Then
Cells(j, 13).Value = Left(Cells(j, 12), 2).Value
'If Cells(i, 13).Value <> "" Then
Cells(j, 12).Value = ""
'End If
End If
Next
End Function