Moving only certain data from one column to another

Tabako1960

New Member
Joined
Jun 24, 2024
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
  2. MacOS
  3. Mobile
If I have data like this, how can I copy just the data up to the second \ or third \ into Column B? I tried entering the data I wanted into the adjacent cell, hitting enter and then Ctrl E, but it didn't work, or it didn't work correctly or consistently.
D:\FTP\Test\vo.1 validationD:FTP\Test
D:\FTP\Prod\simulation B
D:\Web\Agents\Applications\Tominex64
D:\Accounting\2020\AP
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Welcome to the MrExcel forum!

Book2
AB
1Up to the 2nd \
2D:\FTP\Test\vo.1 validationD:\FTP
3D:\FTP\Prod\simulation BD:\FTP
4D:\Web\Agents\Applications\Tominex64D:\Web
5D:\Accounting\2020\APD:\Accounting
6
7Up to the 3nd \
8D:\FTP\Test\vo.1 validationD:\FTP\Test
9D:\FTP\Prod\simulation BD:\FTP\Prod
10D:\Web\Agents\Applications\Tominex64D:\Web\Agents
11D:\Accounting\2020\APD:\Accounting\2020
12
13Up to the last \
14D:\FTP\Test\vo.1 validationD:\FTP\Test
15D:\FTP\Prod\simulation BD:\FTP\Prod
16D:\Web\Agents\Applications\Tominex64D:\Web\Agents\Applications
17D:\Accounting\2020\APD:\Accounting\2020
Sheet2
Cell Formulas
RangeFormula
B2:B5B2=LEFT(A2,FIND("|",SUBSTITUTE(A2,"\","|",2))-1)
B8:B11B8=LEFT(A8,FIND("|",SUBSTITUTE(A8,"\","|",3))-1)
B14:B17B14=LEFT(A14,LEN(A14)-LEN(TRIM(RIGHT(SUBSTITUTE(A14,"\",REPT(" ",50)),50)))-1)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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