• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Split specific data into different cells

rfreeman

New Member
Hello there,
I need some help with trying to split specific data from cell into 2 different cells. For example I some summary information in 1 cell which needs to split into 2 different cells for deeper reporting purposes.

The data example is a follows:
A1Current State
A2- Date in market: 29-12-21 - Technical complexity: 2
A3- Date in market: 29-12-21 - Technical complexity: 2

I need to split the data in cell A2, so that the only the date is extracted to a new cell B3. Then I need the 2 from Technical Complexity to be extracted to a new cell C3.

Attached is an excel example of how I need the finished data to appear, however I am having issue using the right formula to split the data as needed

If anyone can help me work this out I would be very grateful

Regards
Rohan
 

Attachments

  • Chandoo help - split data to cells.xlsx
    10.5 KB · Views: 8
In D2, formula copied across right to G2, and all copied down :

=0+MID(LEFT($A2&" "&$B2,IF(E$1="",199,SEARCH(E$1,$A2&" "&$B2)-4)),SEARCH(D$1,$A2&" "&$B2)+LEN(D$1)+2,99)

Then,
  • Select D2:D5 >> Format Cell >> "Date" >> choose: "d/m/yyy"
  • Select E2:F5 >> Format Cell >> "General"
  • Select G2:G5 >> Format Cell >> Currency >>" Decimal place" : 0 and "Symbol" : $
73715
 

Attachments

  • Split data to cells (BY).xlsx
    12.4 KB · Views: 3
Last edited:
Thanks for the responses. I was trying to use a combination of LEFT & FIND formulas but was getting stuck
 
Last edited:
Thanks @bosco_yip for your very detailed response. The formula you provided is very complex and I am trying hard to understand all the sub-strings.
It does work, however for my own learning I am trying to understand this a bit better so I can follow all the steps
 
Thanks @bosco_yip for your very detailed response. The formula you provided is very complex and I am trying hard to understand all the sub-strings.
It does work, however for my own learning I am trying to understand this a bit better so I can follow all the steps
If you find the above formula (used 6 functions) in some complex, you could try another a bit shorter formula (used 3 functions) as in :

=FILTERXML("<a><b>"&SUBSTITUTE(SUBSTITUTE($A2&$B2,D$1&": ","<r/>"),"- ","</b><b>")&"</b></a>","//b[r]")

73717
 
Hi again team, thanks so much for the help with the formulas. I ended using a TRIM function to get the desired result as I found the string the easiest to follow and explain.

The end result data summary is now working well, however I have a side issue that is related to additional incomplete data.
The Current State & Required Capabilities fields are always pre-populated with in cell titles, but the actual data is not populated until after further review. So the issue I have is when there is no date, or number or $ figure, I get an #VALUE error in my original formula.

Can anyone help me try work out how to return a blank value if one of the pre-defined conditions is not met?

I have attached a further live example sheet for further understanding, as you will se in rows 9-11

Thanks again!
 

Attachments

  • Chandoo help part 2.xlsx
    19.9 KB · Views: 6
You can wrap the formula with an IFERROR function like =IFERROR(IF($H9="";"";TRIM(MID($H9;FIND(":";$H9)+1;9))+0);"")
 
Back
Top