File Path into Single Cells

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,843
Office Version
  1. 2010
Platform
  1. Windows

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">C1</th><td style="text-align:left">=TRIM(<font color="Blue">MID(<font color="Red">SUBSTITUTE(<font color="Green">$A1,"",REPT(<font color="Purple">" ",100</font>)</font>),COLUMNS(<font color="Green">$C:C</font>)*99-98,99</font>)</font>)</td></tr></tbody></table></td></tr></table><br />



Excel 2010
ABCDEF
1xxx Old Laptop\WW I June 2016\Australian War Diaries\RCDIG1003248.pdfxxx Old LaptopWW I June 2016Australian War DiariesRCDIG1003248.pdf
Sheet20
 
Upvote 0
there is a \ missing in the formula

Code:
=TRIM(MID(SUBSTITUTE($A1,[COLOR="#FF0000"]"\"[/COLOR],REPT(" ",100)),COLUMNS($C:C)*99-98,99))

if the filename only needed, you can try this

Code:
=TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",500)),500))
 
Last edited:
Upvote 0
my formula actually was: =TRIM(MID(SUBSTITUTE($A1,"\",REPT(" ",100)),COLUMNS($C:C)*99-98,99))

when using the html add-in the backlash was removed



Hi VBA Geek... I'm not sure what is going wrong here:-

Sheet1

ABC
xxx Old Laptop\WW I June 2016\Australian War Diaries\RCDIG1003248.pdfxxx Old Laptop\WW I June 2016\Australian War Diaries\RCDIG1003248.pdf

<tbody>
[TD="align: center"]1[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
C1=TRIM(MID(SUBSTITUTE($A1,"",REPT(" ",100)),COLUMNS($C:C)*99-98,99))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
C1: =left(a1,find("",a1)-1)
d1: =mid(a1,len(c1)+2,len(c1))
e1: =mid(a1,len(c1)+len(d1)+3,find("#",substitute(a1,"","#",len(a1)-len(substitute(a1,"",""))))-len(c1)-len(d1)-3)
f1: =mid(a1,len(c1)+len(d1)+len(e1)+4,find(".",a1)-len(c1)-len(d1)-len(e1)-4)
 
Upvote 0
That's got it... thanks VBA Geek and thank you too Alan.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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