View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default how to obtain sheet name?

Use the CELL() function:

=CELL("filename") will display:
C:\Documents and Settings\Owner\My Documents\[cell function.xls]Sheet1
the full file name



=LEFT(A1,FIND("[",A1,1)-2) will display:
C:\Documents and Settings\Owner\My Documents
the path name


=MID(A1,FIND("[",A1,1)+1,FIND("]",A1,1)-FIND("[",A1,1)-1) will display:
cell function.xls
the workbook name


=RIGHT(A1,LEN(A1)-FIND("]",A1,1)) will display:
Sheet1
the sheet name

--
Gary's Student


"Khoshravan" wrote:

I want to put sheet name as a referrence in "ifcount" function.
Is there any function to give the sheetname as a parameter, to be used in
functions (not only in "ifcount" but in others).
I know it is possible in VBA, but I don't think I can do it in VBA. I need
Excel.
--
Rasoul Khoshravan Azar
Civil Engineer, Osaka, Japan