Currently I have this in Cell A1:
"timeZone":"Etc/UTC"},"body":"[~kevin.tom] [~sergio.Melle] [~seema.item] Was the report delivered to the client?","updateAuthor":"body":"[~katelyn.robert]\r\n\r\nNot yet","updateAuthor":
And I want to extract everything between
"body":"
and
","updateAuthor
As you can see in A1, if I split the content between "body":" and ","updateAuthor we have two results:
[~kevin.tom] [~sergio.Melle] [~seema.item] Was the report delivered to the client?
and
[~katelyn.robert]\r\n\r\nNot yet","updateAuthor
I want to be able to extract the last result, which is
[~katelyn.robert]\r\n\r\nNot yet","updateAuthor
I will be always be adding more to cell A1 and I need Cell B1 to update and pull the last result, whatever it may be.
Currently, I was able to come up with this code in Cell B1:
=MID(B1, FIND("body",B1)+7, FIND("updateAuthor", B1, FIND("body", B1)+1)-FIND("body",B1)-10)
This works for me but it extracts the first result it finds whereas I would like the results of the last occurrence. Essentially, excel searched from Left to Right when I would like it to search from Right to Left. Does anyone know how to modify this to make it work?
Currently, with my code in B1, I am getting this in B1:
[~kevin.tom] [~sergio.Melle] [~seema.item] Was the report delivered to the client?
But I want this:
[~katelyn.robert]\r\n\r\nNot yet
I am trying to accomplish this without using VBA
B1
that is referencingB1
. I guess you have a formula in CellB1
that is referencingA1
(or vice versa). Please do not respond in comments; edit your question to make it clearer and more complete. – Scott Jul 9 '18 at 18:43"body":"
? – cybernetic.nomad Jul 9 '18 at 18:44"body":"
and","updateAuthor
So to answer your question, yes, there will be multiple"body":"
– Kevin Truong Jul 9 '18 at 18:58("body":")(.+?)(","updateAuthor":$)
. More info on how to do so here – cybernetic.nomad Jul 9 '18 at 19:24