I'm trying to extract specific datapoints from string of text and have a hard time figuring out how to do so.
What I need to achieve is to extract dates from a specific string. The string structure is as follows: Product: XX1, Made by: WWW ZZZ, Date: YYYY-MM-DD; and it can be repeated multiple times (see the screenshot below). There are three different product types (lets say: Car_VW, Car_Tesla, Car_PS - there are no records with other product types) and date has to be extracted separately for each one of them.
Moreover, one product type can appear few times (up to three times) in this string so the date needs to be stored separately for each instance of its appearing.
Columns E - M show what I need to achieve based on data in column C
I came up following formula:
=IFERROR(IF(AND(FIND(LEFT(E$3,6),$C4,1)>0,FIND("Product",$C4,1)=1),MID(MID($C4,FIND(LEFT(E$3,6),$C4,1),LEN($C4)-FIND(LEFT(E$3,6),$C4,1)),FIND("Date: ",MID($C4,FIND(LEFT(E$3,6),$C4,1),LEN($C4)-FIND(LEFT(E$3,6),$C4,1)),1)+6,10),"no go"),"")
Which works only for first "iterations" of each product.
Looking at how the data in column C is formatted, do you guys think it's possible to write something that would return correct values for each iteration/loop? If so, a little help would be much appreciated. If anyone knows a better way to do it, please let me know. Would using VBA be a better approach?