Finding Specific String within larger String with Qualifications

Jezzzza

New Member
Joined
Jun 29, 2023
Messages
22
Office Version
  1. 365
Platform
  1. MacOS
I have a report showing an audit trail of users and the output is very very messy, no delimiters, massive amount of text in single cell. We have a user who changed the job code field on an unknown number of users, and I am trying to find the last instance it occurred using a particular string and two search parameters , then pulling everything after another string that comes before it.

for example, in this original string:
1742837710667.png


I am particularly needing the last occurrence of "Changed Job code" but I also need to know the date on which it occurred, so specifically in this example I would need everything from the final green "Updated at..." string to the end but only if it is the "updated at" occurring before the last occurrence of "Changed job code" if that is even possible.

Currently I have this formula:
=IF(AND(COUNTIF(J3,"*Denise*"),"Yes","No",COUNTIF(J3,"*job code*")),"Changed Job code from"&TEXTAFTER(J3,"Changed Job code from",-1),"")

which is working to find all cells that have anything changed by Denise and also including any change in job code, then pulling the data after the last job code change, but I still need to also know on what date it occurred (green highlighted text in image).

Result in column B

Honestly not sure if this is even possible, but if so, it would be a life saver.

Thanks in advance!
 
Amazing, thank you so much, that worked perfectly.

To verify, this will find the last instance of those two strings regardless of the name attached as the 'updater' and if it doesn't find 'change job code' it returns blank?
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top