Add File Name to a Cell without Extension?

slam

Well-known Member
Joined
Sep 16, 2002
Messages
915
Office Version
  1. 365
  2. 2019
Hi all,

I've seen a few ways to do this, but they don't account for file extensions being different lengths - typically 3 (.xls) or 4 (.xlms)

Is there anyway this can be done? My file names will never have a period in them if that helps.

Thanks
 
Thanks very much, I'll give this a go!

It didn't work at first, but that's because someone (in their infinite wisdom) decided to include a "." in the user names, which then formed part of the full file address. I solved it by adding in the section of code you use for the start of the MID so that it finds the first "." after the beginning of the file name.

Thanks again for your help!
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,646
Messages
6,173,536
Members
452,520
Latest member
Pingaware

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