Excel Pro Plus 2019 read folder names & extract parts of name to specific columns?

Event2020

Board Regular
Joined
Jan 6, 2011
Messages
118
Office Version
  1. 2019
Platform
  1. Windows
Windows 10
Excel Professional Plus 2019

I have a large number of folders which I want excel to scan and create a list of the folder names but it is not simple as the folders are named in a particular way and excel needs to extract different parts of the folder name and place it in separate columns.

Example - each folder is named in the same way...

Code 18_-_Oranges_&_Apples_[Fruit]_(20_Packs)_9.5_kilos_10.Boxes_Yes
Code 34_-_Raisins_[Dried_Fruit]_(8_Packs)_50_grams_4.Boxes_No

In Excel the above example should become

Column 1Column 2Column 3Column 4Column 5Column 6Column 7
Code 18Oranges_&_ApplesFruit20 Packs9.5 kilos10.BoxesYes
Code 34RaisinsDried Fruit8 Packs50 grams4.BoxesNo

This is beyond my skill so any help would be very much appreciated.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I'm looking at the result Oranges_&_Apples and the result 20 Packs. Is it correct that column 2 preserves the in-string underscores, while column 4 and 5 should change them to spaces?
 
Upvote 0
Hi mikericksom

woops, that was a mistake on my part.

All in-string underscores should be changed to spaces or ignored, as should [ ] in column 3 and ( ) in column 4.

I would edit my original post to reflect this but I am unable to discover an edit function for my post.
 
Upvote 0

Forum statistics

Threads
1,215,733
Messages
6,126,541
Members
449,316
Latest member
sravya

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