Friday, October 21, 2011

Get the excel file name, file path,workbook name and also worksheet name....

Use this Formula to get File Name
=CELL("filename")

Get th Path with this formula....
=MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)

Get the Workbook name with this formula....
 =MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-1)

Get the Worksheet name with this formula....
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

No comments:

Post a Comment