Formula to return the name of a tab?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We have a spreadsheet set up that pulls the minimum value from several different tabs. We are looking for a formula or a way to display, in the next column, which tab that minimum value came from. Does anyone have any ideas?
 
You might check the Help files for information on the SHEETNAME function.

Ed

Amanda said:
We have a spreadsheet set up that pulls the minimum value from several
different tabs. We are looking for a formula or a way to display, in the
next column, which tab that minimum value came from. Does anyone have any
ideas?
 
Okay - my bust! I have been informed that is a CUSTOM function, courtesy of
John Walkenbach's Excel 2000 Formulas. The book says: "The SHEETNAME
function ... accepts a single argument (a range) and returns the name of the
worksheet that contains the range. It uses the Parent property of the Range
object."

The code for it looks like this:

Function SHEETNAME() As String
' Returns the sheet name of the cell that
' contains the function
SHEETNAME = Application.Caller.Parent.Name
End Function

HTH
Ed

Amanda said:
We have a spreadsheet set up that pulls the minimum value from several
different tabs. We are looking for a formula or a way to display, in the
next column, which tab that minimum value came from. Does anyone have any
ideas?
 
Back
Top