Have a leave report which is auto produced from a payroll system which would look something like this, let's say in A2.
Looking to see if there is a formula which can do this, if not VBA.
The number of lines in the cell may vary, there may be multiple lines which commence with the word FROM, and the line number in the cell may vary (eg won't always be the 5th line).
Need to extract the line where it may commence with "From Monday" (or any other day of the week), or may commence with "For one day on Tuesday" (or any other day of the week).
The text searching for in the line above should be unique in all the lines, except possibly line one, which could be a response From Wednesday Addams, so the text we're trying to find will not be in line one.
So would end up with a return of From Wednesday, 6 July 2022 to Friday, 8 July 2022.
From here, I would just add a macro to remove From, the days of the week, replace " to " with character and then text to columns, and will end up with two columns with 6 July 2022 and 8 July 2022.
Any help/pointers/suggestions would be appreciated
Cheers
Looking to see if there is a formula which can do this, if not VBA.
Rich (BB code):
From Joe Bloggs 06-JUL-2022
Unimportant text
More Unimportant text
From Wednesday, 6 July 2022 to Friday, 8 July 2022
Yet more unimportant text
The number of lines in the cell may vary, there may be multiple lines which commence with the word FROM, and the line number in the cell may vary (eg won't always be the 5th line).
Need to extract the line where it may commence with "From Monday" (or any other day of the week), or may commence with "For one day on Tuesday" (or any other day of the week).
The text searching for in the line above should be unique in all the lines, except possibly line one, which could be a response From Wednesday Addams, so the text we're trying to find will not be in line one.
So would end up with a return of From Wednesday, 6 July 2022 to Friday, 8 July 2022.
From here, I would just add a macro to remove From, the days of the week, replace " to " with character and then text to columns, and will end up with two columns with 6 July 2022 and 8 July 2022.
Any help/pointers/suggestions would be appreciated

Cheers