Jun 10 2022 09:19 AM
Hello Helpful People,
I need to apply an excel formula to a string of data.
Here is a screenshot of what I am working with:
In the sheet, Cell B2 will be automatically input as well as cell B4 in the exact format shown above.
I am hoping to create a formula that produces what is seen in cell B6 as opposed to doing the percentage calculations and typing it out every time.
I need to loop through B4, find the different integers that are separated by the $m/ characters and then be able to do the simple division and concatenate the text as seen in B6.
Anyway this is possible will be greatly appreciated and save me tons of time.
Thanks so much!
-JW
Jun 10 2022 10:00 AM
It is possible. But when I see something like this I ask myself "WHY?!". Why not split the data over three columns, put in some basic formulas and your ready?
Jun 10 2022 10:07 AM
Jun 10 2022 12:10 PM
This might work:
=LET(s,SEQUENCE(LEN(B4)-3),u,UNIQUE(FIND("$",B4,s))+1,m,UNIQUE(FIND("m",B4,s)),d,m-u,p,MID(B4,u,d),per,TEXT(p/B2,"(0%)"),TEXTJOIN("/",1,DOLLAR(p,0)&"m "&per))