Hello
I need to pull the date from the below string which is in cell A2
XYZ Error Report for data processed on 13/1/2021
I have this below sub but I returns the Unable to get find property of the worksheet function class. Yet I have used it below but instead of the word "on" it was finding "/" and it work great.
Sub CopyFormulaDown()
Dim LastPopulatedRow As Long
Dim ws As Worksheet
Set ws = ThisWorkbook.ActiveSheet
Range("M7").Value = "Processed Date"
Range("M8").Select
ActiveCell.Formula = Mid(ws.Range("A2"), (Application.WorksheetFunction.Find("""on""", Range("A2"), 1) + 1), 256)
'Find last populated row
LastPopulatedRow = Range("A" & Rows.Count).End(xlUp).Row
'Select the rows where formula is to be populated
Range("M8: " & "M" & LastPopulatedRow).FillDown
End Sub
Thank you
L
I need to pull the date from the below string which is in cell A2
XYZ Error Report for data processed on 13/1/2021
I have this below sub but I returns the Unable to get find property of the worksheet function class. Yet I have used it below but instead of the word "on" it was finding "/" and it work great.
Sub CopyFormulaDown()
Dim LastPopulatedRow As Long
Dim ws As Worksheet
Set ws = ThisWorkbook.ActiveSheet
Range("M7").Value = "Processed Date"
Range("M8").Select
ActiveCell.Formula = Mid(ws.Range("A2"), (Application.WorksheetFunction.Find("""on""", Range("A2"), 1) + 1), 256)
'Find last populated row
LastPopulatedRow = Range("A" & Rows.Count).End(xlUp).Row
'Select the rows where formula is to be populated
Range("M8: " & "M" & LastPopulatedRow).FillDown
End Sub
Thank you
L