Display file name without the file type extension

Is it possible to return the file name value to a cell without the '.xlsx'?

Thanks.
0
Utf
11/23/2009 1:18:01 PM
excel.worksheet.functions 4936 articles. 2 followers. Follow

5 Replies
2456 Views

Similar Articles

[PageSpeed] 53

Try the below in a saved workbook.

=TRIM(LEFT(SUBSTITUTE(MID(CELL("filename",A1),
FIND("[",CELL("filename",A1))+1,255),".xl",REPT(" ",255)),255))

If this post helps click Yes
---------------
Jacob Skaria


"NAHolmes" wrote:

> Is it possible to return the file name value to a cell without the '.xlsx'?
> 
> Thanks.
1
Utf
11/23/2009 1:24:01 PM
Try this:
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-6)

Keep in mind that the "filename" used with CELL() does not return anything 
until the workbook has been saved.

or if you definitely know that the filename ends with .xlsx (and not .xlsm 
or other Excel 2007 file type identifier), then this would work:
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND(".xlsx]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)


"NAHolmes" wrote:

> Is it possible to return the file name value to a cell without the '.xlsx'?
> 
> Thanks.
0
Utf
11/23/2009 1:32:12 PM
This also worked, again - many thanks.

"JLatham" wrote:

> Try this:
> =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-6)
> 
> Keep in mind that the "filename" used with CELL() does not return anything 
> until the workbook has been saved.
> 
> or if you definitely know that the filename ends with .xlsx (and not .xlsm 
> or other Excel 2007 file type identifier), then this would work:
> =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND(".xlsx]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)
> 
> 
> "NAHolmes" wrote:
> 
> > Is it possible to return the file name value to a cell without the '.xlsx'?
> > 
> > Thanks.
0
Utf
11/23/2009 1:51:03 PM
This worked perfectly - many thanks.

"Jacob Skaria" wrote:

> Try the below in a saved workbook.
> 
> =TRIM(LEFT(SUBSTITUTE(MID(CELL("filename",A1),
> FIND("[",CELL("filename",A1))+1,255),".xl",REPT(" ",255)),255))
> 
> If this post helps click Yes
> ---------------
> Jacob Skaria
> 
> 
> "NAHolmes" wrote:
> 
> > Is it possible to return the file name value to a cell without the '.xlsx'?
> > 
> > Thanks.
0
Utf
11/23/2009 1:51:04 PM
This is a great resource:
http://www.mcgimpsey.com/excel/formulae/cell_function.html

HTH,
Ryan--

-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"NAHolmes" wrote:

> This also worked, again - many thanks.
> 
> "JLatham" wrote:
> 
> > Try this:
> > =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-6)
> > 
> > Keep in mind that the "filename" used with CELL() does not return anything 
> > until the workbook has been saved.
> > 
> > or if you definitely know that the filename ends with .xlsx (and not .xlsm 
> > or other Excel 2007 file type identifier), then this would work:
> > =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND(".xlsx]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)
> > 
> > 
> > "NAHolmes" wrote:
> > 
> > > Is it possible to return the file name value to a cell without the '.xlsx'?
> > > 
> > > Thanks.
0
Utf
11/23/2009 5:54:01 PM
Reply:

Similar Artilces:

Dual Displays
I want to connect my Sharp Aquos flat screen TV to my computer, and see my desktop on both the TV and computer monitor. Windows Vista Home Premium. HP Pavilion a1610n computer. Galaxy GeForce 8400 GS graphics card, outputs: 1-VGA, 1-DVI, and 1-SVGA. There is no HDMI port on the card. I connected a VGA cable between the motherboard "on-board" VGA port and the TV, figuring that I could use that output to work with the TV. The computer monitor is plugged into the GeForce graphics card. Tried the Desktop "Display Setting". It says, the number 2 monitor is "N...

Renaming file
Hello all, Hope this is the right group and someone can help me further. I have a mainly VBA question but it is (should be...) a part of my access DB utility. I would like to create a Sub to rename a file in a windows directory. I know that in a directory there in a file which has a part '_SB' on in the name, I would like to rename this file to lets say Test_SB.PDF. Before the rename action, I will check if the file expected it there (FileExists). I cant figure out using fso how to get the full name of the file containing the '_SB' (maybe like FirstTest_SB.ASC) and then...

Maximum File Size #2
What is the maximum recommended file size for an Excel workbook? Hi see: http://www.decisionmodels.com/memlimits.htm -- Regards Frank Kabel Frankfurt, Germany "Lynn" <Lynn@discussions.microsoft.com> schrieb im Newsbeitrag news:EC7732CE-8678-426A-8400-0836D87D80D8@microsoft.com... > What is the maximum recommended file size for an Excel workbook? ...

Folder could not be displayed
I am running Windows XP and Outlook Express 6 just fine then one day my husband does something to my computer and his email account won't work. My email is working just fine but in his he cannot open his inbox. It says folder could not be displayed, and when you send and receive it gives you this error message: "An unknown error has occured. Account: 'incoming.verizon.net'. Server:'incoming.verizon.net'.Protocol:POP3, port: 110, Secure(SSL): No, error number: 0x800C013B" If anyone could help me with this I would greatly appreciate it. Thank you T...

Display a message box "this entry is a duplicate"
How can I display a message box on a form if the shipment number is a duplicate? I need a message box to pop up when user attempts to tab out of the field. Thank you. Something like: Private Sub txtShipNum_BeforeUpdate(Cancel As Integer) If DCount("*", "MyTable", "ShipNum = '" & Me.txtShipNum & "'") > 0 Then Msgbox Me.txtShipNum & " already exists." Cancel = True End If End Sub This assumes that your text box is named txtShipNum, that the name of the field in table MyTable is ShipNum...

Type mismatch in 2007 but not in 2003 version
I have the following code in a vba code attached to a form: Dim rst As Recordset Dim dbs As Database Dim whatif As String Set dbs = CurrentDb whatif = "select * from PersonalDNC where HomePhone = '" & ThisPhone & "'" Set rst = dbs.OpenRecordset(whatif) When I run this 2003 mdb in access 2007 this works. When I convert this to a 2007 database and then run it, I get a "Type Mismatch" error. would I need to put [ ] around HomePhone. PersonalDNC is a linked table that points to a 2003 mdb. Would I need to conve...

open excel file
i have problem with a excel file. the file is not to big. its has 5 tabs only. and when i click on to one of the "tabs" the excel gives me a error message as "not reponding". and this happens with this particular tab only. any help "Rohit" wrote: > i have problem with a excel file. the file is not to big. its has 5 tabs > only. and when i click on to one of the "tabs" the excel gives me a error > message as "not reponding". and this happens with this particular tab only. > > any help Try looking at thi...

Outlook Name Suggestion Issue
I am working on a strange issue with name suggestion in Outlook 2k3 version. For some users when I type the alias for the first time it resolved the name. The next time I try to type few characters for the same user. it suggests me with the complete name but this time in the brackets <> the alias would be some starnge name with some numbers. This strange alias number does not existing in our organization nor the number that appears along with it appears in the User AD properties. Examples: First time I type the alias as: "nnair" and press Ctrl + K = It resolves...

how to display values in 3 cells into one cell
Anyone can help me how do I display the 3 separate different values in 3 cells into just one single cell ? thanks so much in advance. Either there was a typo or there's an echo in here. That line should have been: = A1 & " " & B1 & " " & C1 "Bradley Dawson" <bradleydawson@earthlink.net> wrote in message news:l464b.2224$Lk5.2093@newsread3.news.pas.earthlink.net... > In the target cell, type: > > = A1 & B1 & C1 > > where A1, B1, C1 are the cell addresses that you want to concatenate. > > If these have number...

How to select & display distinct values
Hello, I need help with a form please. My form has two controls, the first being a combo box. This box should select the company name from a lookup table. The lookup table has only two companies in it, however, they each are repeated several time. Company 1 has about 10 rows, company 2 has 3 rows. I used the query builder and came up with the statement: "SELECT DISTINCT Lktbl_Role_Master.CompanyName FROM Lktbl_Role_Master;" When I run the statement directly from query view, it executes perfectly and returns exactly two rows (one for each company, in a datasheet view) ho...

In nameing a sheet in Excel it puts a .xls] in front why?
Every time I go to name a sheet it puts an .xls] in front of it and I do not know why Did you try to put brackets around the name? -- Don Guillett SalesAid Software donaldb@281.com "EZE" <EZE@discussions.microsoft.com> wrote in message news:C9045E70-AD04-4C91-B223-8851A0DFE55D@microsoft.com... > Every time I go to name a sheet it puts an .xls] in front of it and I do not > know why Remove the bracket or other illegal character(s) from the workbook name. In article <C9045E70-AD04-4C91-B223-8851A0DFE55D@microsoft.com>, EZE <EZE@discussions.microsoft.com>...

Display Time in Outlook
The time setting in my Outlook is one hour behind my actual time. I cannot determine how to change the time. Outlook is the only item that is incorrect. Other display times in operating system are correct. Thanks, Jodi ...

Remotely viewing event log without full access to server
Hi, I'd like to know if it is at all possible to allow a domain user to access the event log on a remote server (say server 2003 standard or 2008 R2) but not have the ability to log into the server itself. For example, to allow someone to monitor the server logs but not allow them to make any changes to the server itself. Much appreciated. "Mehdis" <Mehdis@discussions.microsoft.com> wrote in message news:B2A2906B-1A4D-4019-ABBE-30D2604792C9@microsoft.com... > Hi, > > I'd like to know if it is at all possible to allow a domain user to acce...

HELP! Splitting a 200mg+ file into smaller files
I starting putting together a very large family journal in MS Publisher 2002. I am now at a file size over 200MG and am less then 10% complete with the project. I can not find a way to split the file into "chapters" of smaller units. Is it possible? Can I have 20 or 30 files that link together and act as one? Where can I find information out on this subject? Jim If I were faced with this project I'd create a pub file for each chapter then make each chapter a pdf file and then join the pdf files into one file. I use Publisher 2000 so it would require me to open two Publ...

Huge file size
I have a excel file that has all of a sudden grown to a huge size 19,278,336 . It is stock market data with a worksheet for each year of data (1968 to 2004). So 35 worksheets. For years it has always run about 1.8 meg. Just this year it has all of a sudden grown with no real difference in the data I add each day. Each row has 9 columns of data advances, declines, etc. There are 21 columns that make calculations based on the preceding 9 columns. But years 1968 - 2003 just have data, not formulas. I converted the cells to numbers from formulas. And I had several charts, but I de...

file attachment #4
Could anyone suggest how to override the setting that I have in Outlook Express? I try to send a file attachment with my emails and it deletes them when I send the email out. It says OE has deleted the file just in case it has a bug in it.Akkkk! any help would be appreciated. This newsgroup is for support of Outlook 97-2003 from the Office family for Windows PCs. For Outlook Express (OE) support try posting in one of these newsgroups: microsoft.public.inetexplorer.ie4.outlookexpress for OE 4.x microsoft.public.windows.inetexplorer.ie5.outlookexpress for OE 5.x http://support.microsoft.com...

does anyone here actually use names?
hi, i am self learning about excel. i have came across NAMES topic. does anyone here actually use names? when r they usefull? i dont reall see a real need for them, especially in formulas. the only time i use name is for when i name a large block of data, so dont have to re-select the cells all the time. cheer -- Message posted from http://www.ExcelForum.com There are lot's of uses for named range and named constants etc. See the 2 links below http://www.ozgrid.com/Excel/DynamicRanges.htm http://www.ozgrid.com/News/excel-named-ranges.htm#ExcelTips Posted via: http://www.ozgrid....

PK and FK Displayed
I am a complete Visio newbie, and cannot find the answer I need in books or online help. I am trying to create ER diagrams from scratch, and not connected to real tables, using VEA. I have added tables ('Entities') to the form, connected them with a Relationship connector, and, in the Database Properties window I've assigned the end points to a Primary Key on the left and a Foreign Key on the right. But the model shows the connector as running between the top colums on both sides, whereas I want the keys to be in that upper box and provide the connector's end points. Wh...

Formulas are displayed, results are not
Hello, For some reason, when I enter a formula into a cell and press enter, the formula just stays there. Anyone know what I can do to show the results? I tried pressing Cntrl + `, but that didn't work. FYI, when I cut and paste a column from a separate workbook, that column works like normal (i.e., the formulas produce results). Thanks for any suggestions! Hi Mike, Maybe your cell is preformatted as Text. Try formatting to general then erase your = and type it in again. HTH Martin "Mike C" <js2k111@yahoo.com> wrote in message news:f699bcd4-ad82-4a88-9759-5638c147b...

Trouble Opening WMV File
Running Win XP SP3. Have Corel's (Intervideo) WIN DVD 8 installed, and have this as my program of choice in the Folders entry in control panel as the program to always open WMV programs. When I point to a WMV program and pick play or open, I get a message "File xxx is not a valid Win32 Program." and an abort. However, if I launch WinDVD 8, and have the program point to the file, it opens and plays it perfectly every time. Do I have an error in my system somewhere? Thanks in advance for any help. -------- Original-Nachricht -------- > Running Win XP SP3....

attching files in outlook 2007
hello, if I try and insert a file into a message in outlook 2007 I only get options to insert or insert as text. in previous versions there was an option to insert as a hyperlink, is this no longer available? I am using outlook/office 2007 with SP2 installed. Thanks in advance for any help. Taffy B "TAFFY" <TAFFY@discussions.microsoft.com> wrote in message news:01D958C4-B54B-4127-BB93-F414AD3D9A68@microsoft.com... > hello, > if I try and insert a file into a message in outlook 2007 I only get > options > to insert or insert as text. in pre...

Publisher 2003 files
I have file I created in Publisher 2003. Can I read them and edit them in Publisher 2007? yep -- ~~~~~~~~~~~~~~~~~~ Rob Giordano Microsoft MVP Expression "Russbe" <Russbe@discussions.microsoft.com> wrote in message news:E21FB024-C659-410D-AD40-D3D1137129F6@microsoft.com... > I have file I created in Publisher 2003. Can I read them and edit them in > Publisher 2007? ...

pivot table label adding "2" to the end of a label name
Hi, I have a pivot table and sometimes it adds a "2" to the end of a row lable ie. "joes pizza" is displayed as "joes pizza2". the sorce data certanly doesn't include the "2" and it seems like it is trying to tell me some thing ;). It might be hapening after i do a "replace command" in the source data (replace "sams pizza" with joes Pizza"). any one experienced this? Cheers, The only time I've seen this is when I had multiple headers with the same name. If I were you, I'd check once more--don't forget to c...

Stop displaying a line
I have a line graph/chart and it gets its values using a formula and the values of another column. However this poses a problem because if there is nothing in the targetted column the formula returns 0 cause the line to drop to the bottom, instead of casuing the line to just end until a value is added to the target column. How can I do this? Change your formula to use NA() if the cell is empty. For example: =IF(A1="",NA(),A1) To hide the resulting #N/A errors on the worksheet, you can use conditional formatting. There are instructions here: http://www.contextures.com/xlC...

Macro to import from a binary file and convert to hex
Excel 97. I have a macro that imports hex and stores the data in a column. Can this be done with a binary file? Import from a binary file and convert to hex and store it in a column? ...