Microsoft Excel Question:
Download Job Interview Questions and Answers PDF
Is there a function that returns the name of the worksheet?
Answer:
Excel's CELL function comes close. The following formula displays the workbook's full path along with the worksheet name:
=CELL("filename")
For example, this formula might return something like:
C:WindowsDesktop[Budget.xls]Sheet2
Returning only the sheet name requires a more complex formula:
=MID(CELL("filename"), FIND("]",CELL("filename"))+1, LEN(CELL("filename"))-FIND("]", CELL("filename")))
=CELL("filename")
For example, this formula might return something like:
C:WindowsDesktop[Budget.xls]Sheet2
Returning only the sheet name requires a more complex formula:
=MID(CELL("filename"), FIND("]",CELL("filename"))+1, LEN(CELL("filename"))-FIND("]", CELL("filename")))
Download MS Excel Interview Questions And Answers
PDF