A formula to put the sheet’s name into a cell
The CELL() function with the “filename” argument will return the full path of the workbook plus the sheet name. The workbook will be enclosed in brackets . This formula finds the right bracket (]) and returns everything after that.
Note that if the workbook has not been saved, there is no path, and this formula returns a #Value error.