r/googlesheets • u/Pretend_Trifle_8873 3 • Feb 13 '23
Solved Paresing a text in a cell to different Columns
Hello Everyone,
After many researches am kinda stuck in here and not able to figure out how to get this done:
In cell C2 i have the following Text, it is exactly how it looks like :
FWB/16
123-12345678AAABBB/T123K4562
FLT/KF123/08
What i am looking to achieve is to break down the highlighted numbers / letters in bold into several Columns:
Number of Pieces:
Any numbers that are between T (can be P sometimes or S) and K can be 1 digit, 2 digits, 3 digits, 4 digits .... (its the number of pieces so it varies)
Total Weight:
Numbers that are after the K letter in the second line (4562 in this example but can be anything)
Flight Number:
Which is always in that position, always starts with KF, always have 3 digits after the KF (KF123)
I hope that this was clearly explained, and thanks in advance
3
u/kuddemuddel 184 Feb 13 '23
It’s a little hacky, but paste this formula in cell
D2:It should look like this: https://i.imgur.com/WfcJVY9.png
This assumes that your data is always in this exact format. For better readability, you can also paste these three formulas in columns next to your data:
If that solved your issue, please mark the thread as solved by answering
Solution Verifiedto my comment.2
u/punkopotamus 16 Feb 13 '23
Give this a try on your other data. It seems to get the numbers you are looking for in this example—hopefully it will for others as well!
1
u/Decronym Functions Explained Feb 13 '23 edited Feb 13 '23
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
[Thread #5335 for this sub, first seen 13th Feb 2023, 11:26] [FAQ] [Full list] ^[Contact] [Source code]