I am looking to split my cells from one column into two separate columns. I have data with an amount and a unit of measure (ex. 5kg). I am looking to separate that data into two columns, so it would be the amount in one column and the unit of measure in another tab (so 5 would be in one column and the column to the right would be kg). I have tried using the text to columns, but need more description on this. The data is inputted currently like "5kg" and there is no space between the 5 and the k, so that is where I am having difficulty. Thank you in advance!
May 20, 2024
Microsoft Learn Q&A needs your feedback!
Want to earn $25 for telling us how you feel about the current Microsoft Learn Q&A thread experience? Help our research team understand how to make Q&A great for you.
April 9, 2024
Contribute to the Microsoft 365 and Office forum!
Click here to learn more 💡
May 10, 2024
Excel Forum Top Contributors:
Splitting Column Cells into Two Columns
- Subscribe
- Subscribe to RSS feed
Report abuse
Thank you.
Reported content has been submitted
Referring to the screen shot below
Formula in B2: =VALUE(LEFT(A2, MATCH(FALSE, ISNUMBER(MID(A2, ROW(INDIRECT("1:"&LEN(A2)+1)), 1) *1), 0) -1))
Formula in C2: =MID(A2,LEN(B2)+1,255)
If desired, you can remove the formulas later by selecting the columns containing the formulas and Copy -> Paste Special >- Values to remove the formulas.
Also, if all data is a single unit type and you are wanting to use the values but still display the kg with the value after using the formulas in column B, you can use Custom Number Format.
The Custom number format is as follows.
0"kg" (That is zero, double quote, kg and double quote again.
OssieMac
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Hi Kailyn. I am an Excel user like you.
Excel will automate this with Flash Fill.
Enter the breakdown you want for the first row of the data as below..
Then highlight the range that you want to fill in. In the screenshot this would be B2:B5. Then click on Flash Fill on the Data ribbon in the Data Tools section.
Excel will fill in the corresponding data.
Then repeat for the next column highlighting the range (C2:C5 this time) and click Flash Fill.
Rich~M
Report abuse
Thank you.
Reported content has been submitted
1 person found this reply helpful
·Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
@Rich-M
Absolutely magic. My original reason for joining the forum was to pick up on stuff that I didn't know about.
@Kailyn Kilroe
You might be interested in the following couple of Microsoft links with further information on FlashFill.
OssieMac
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
If you have seperators in your string, it may cause issues with your excellent solution.
(the formula in B7, and another formula in C7)
I would use a simplier worksheet function like in E2?
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Hi,
In cell C2, enter this formula
=TEXTSPLIT(A2,VSTACK(".",SEQUENCE(10,,0)),,TRUE)
In cell B2, enter this formula
=1*(LEFT(A2:A4,SEARCH(C2:C4,A2:A4)-1))
Hope this helps.
Ashish Mathur
www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Question Info
Last updated May 6, 2024 Views 76 Applies to: