Helpful formatting/delimeters for a multi-use text box?

Office_Drone

New Member
Joined
Jun 17, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi there!

I need to compile the results of an online workplace survey; the results export to a CSV.

Unfortunately, the way this thing was designed there are multiple questions that prompt for a comment to be added to a textbox - but there's just one textbox to capture all the potential comments. Users specified which question they were adding the comment to by adding the question number, but the formatting is all over the place!

E.g.:
  • 5. Problem X occurred 7. Deadline revised on 2024/04/16
  • 12 & 13: John Doe
  • 3) Situation Y occurred on May 12

I don't think I can unscramble these eggs, so I'm resigned to a lot of manual work this go around. But the next time this goes out, I can get instructions added to at least prompt users to use a common format. Any ideas on which delimeters I should specify they use? And the best formula to leverage them to separate the output (some kind of textsplit, I'm thinking?)

Thanks in advance! Future me is grateful to you!! :)

Here's some sample output (hope I did this correctly?)

sample workbook.xlsx
ABCDEFGHIJKLMNOPQRS
1Review IDStaffReview DateQ1Q2Q3Q4Q5Q6Q7Q8Q9Q10Q11Q12Q13Q14Q15Notes
221114Mouse, Mickey2024-06-07N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AYesN/A14. Bob Smith
321097Mouse, Minnie2024-06-07YesYesNoNoYesN/AYesNoNoN/ANo.YesN/AN/AN/A3. File delayed by client. 4. File reopened. 9. Classification changed.
421082Duck, Donald2024-06-06YesYesYesYesN/AYesYesYesYesN/ANo.NoYesN/AN/A12. Marsha 13. Marsha
521049Potter, Harry2024-06-04YesYesYesNoYesNoYesYesYesN/ANo.YesNoN/ANo4) File extended May 8 and May 23. 5) Client added additional work order. 6) Discount applied.
621045Granger, Hermione2024-06-04YesYesYesYesN/ANoYesYesYesN/ANo.NoYesN/ANo6) Discount applied. 12) & 13) Goofy emailed 3 times.
721039Wayne, Bruce2024-06-04YesYesNoYesN/AYesYesYesYesNoNo.NoYesYesN/A2) Late submission 12) Deadline missed - Dumbledore & Snape 14. Lucifer
821032Wilde, Oscar2024-06-04N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AYesN/A14. Tom & Jerry
921025Bronte, Anne2024-06-03YesNoYesYesN/AN/AYesNoNoN/ANo.YesNoN/AN/A2) Project started May 17
1020921Hepburn, Katharine2024-06-05YesYesYesYesN/ANoYesYesYesN/ANo.NoYesYesN/A12. Bill & Ted 13. Bill & Ted 14. Jan
review_entries_2024-06-01_-_202
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi, welcome to the forum, if your sample data is accurate then it looks like the notes have been separated using a line feed character. If that's the case you can split them like this.

Book5
STUV
1Notes
214. Bob Smith14. Bob Smith
33. File delayed by client. 4. File reopened. 9. Classification changed.3. File delayed by client.4. File reopened.9. Classification changed.
412. Marsha 13. Marsha12. Marsha13. Marsha
54) File extended May 8 and May 23. 5) Client added additional work order. 6) Discount applied.4) File extended May 8 and May 23.5) Client added additional work order.6) Discount applied.
66) Discount applied. 12) & 13) Goofy emailed 3 times.6) Discount applied.12) & 13) Goofy emailed 3 times.
72) Late submission 12) Deadline missed - Dumbledore & Snape 14. Lucifer2) Late submission 12) Deadline missed - Dumbledore & Snape14. Lucifer
814. Tom & Jerry14. Tom & Jerry
92) Project started May 172) Project started May 17
1012. Bill & Ted 13. Bill & Ted 14. Jan12. Bill & Ted13. Bill & Ted14. Jan
Sheet1
Cell Formulas
RangeFormula
T2,T8:T9,T10:V10,T7:V7,T6:U6,T5:V5,T4:U4,T3:V3T2=TEXTSPLIT(S2,CHAR(10))
 
Upvote 0
Thanks for the reply! Since different users only need to add comments for certain questions, that means that the answers in the columns won't line up. That's why in the output above, column T has answers to multiple questions. Is there anything I can do so that all the comments for question 1 are in the same column, question 2 in the next column, etc.? And if a user doesn't add comments for certain questions, the fields in those columns will be blank?
 
Upvote 0
Hi, I don't have a solution for the "12) & 13)" scenario and in those cases the comment will appear in the column of first listed number. But here is something you could try in T2 copied down.

Excel Formula:
=LET(ts,TEXTSPLIT(S2,CHAR(10)),S,SEQUENCE(,15),IFERROR(INDEX(ts,MATCH(S,BYCOL(ts,LAMBDA(bc,LEFT(bc,MATCH(FALSE,ISNUMBER(MID(bc,{1,2,3},1)+1),0)-1)+0)),0)),""))
 
Upvote 0
Solution
Thank you! That works great, and is very forgiving in terms of formatting. I will use this! :)
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

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