Use tiltle in a cell

  • Thread starter Thread starter µ
  • Start date Start date
Μ

µ

Is there a way to use the title of the spreadsheet as a cell value?
I asked this before in another topic, but there was no reply.

My sheet get's it's title from a database and is variable.
So if i can use the title i can strip several characters from the
title and use this.

So I want to retrieve the title of the spreadsheet and use this in a
cell.

Thanks!
 
The name of a worksheet can be extracted to a cell with:
=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)
best wishes
 
If you're talking about the worksheet name, see

http://www.mcgimpsey.com/excel/formulae/cell_function.html

If you're talking about the Workbook document property "Title", then
this UDF would work:

Public Function GetTitle(Optional ByVal rng As Range) As String
Dim wb As Workbook
If Not rng Is Nothing Then
Set wb = rng.Parent.Parent
Else
Set wb = Application.Caller.Parent.Parent
End If
GetTitle = CStr(wb.BuiltinDocumentProperties("Title"))
End Function
 
Thanks all of you!!
Because I'm using the Dutch version of Excel this formula looks looks
this:

=DEEL(CEL("filename");VIND.ALLES("[";CEL("filename"))+1;VIND.ALLES("]";CEL("filename"))-VIND.ALLES("[";CEL("filename"))-1)


Thanks for getting me started!!!
 
Back
Top