shahzeb123
Board Regular
- Joined
- Jul 29, 2021
- Messages
- 61
- Office Version
- 2016
- Platform
- Windows
Guys
Need your help; i need to extract below highlighted data into column L, now i have code which extract the data but it needs identificatio.
In this the identification is only below line of "identifier code", it may change sometime there is nothing mentioned in "F57A" then nothing to be extracted.
One identification is this field is always below to "BLOCK 4"
Please help !!!
Sub MyMacro()
Dim lr As Long
Dim r As Long
Application.ScreenUpdating = False
' Find last row in column A with data
lr = Cells(Rows.Count, "A").End(xlUp).Row
' Loop through all data
For r = 31 To lr
' Check to see if row above says "Block 4"
If Left(Cells(r - 1, "A"), 7) = "Block 4" Then
' Populate column L with formula
Cells(r, "L").FormulaR1C1 = _
"=MID(RC[-11],FIND(""ABOC"",MID(RC[-11],FIND(""F57A"",RC[-11]),999))+FIND(""F57A"",RC[-11])-1,11)"
End If
Next r
Application.ScreenUpdating = True
End Sub
Need your help; i need to extract below highlighted data into column L, now i have code which extract the data but it needs identificatio.
In this the identification is only below line of "identifier code", it may change sometime there is nothing mentioned in "F57A" then nothing to be extracted.
One identification is this field is always below to "BLOCK 4"
Please help !!!
Sub MyMacro()
Dim lr As Long
Dim r As Long
Application.ScreenUpdating = False
' Find last row in column A with data
lr = Cells(Rows.Count, "A").End(xlUp).Row
' Loop through all data
For r = 31 To lr
' Check to see if row above says "Block 4"
If Left(Cells(r - 1, "A"), 7) = "Block 4" Then
' Populate column L with formula
Cells(r, "L").FormulaR1C1 = _
"=MID(RC[-11],FIND(""ABOC"",MID(RC[-11],FIND(""F57A"",RC[-11]),999))+FIND(""F57A"",RC[-11])-1,11)"
End If
Next r
Application.ScreenUpdating = True
End Sub