Friday, April 28, 2006

Current Excel workbook name and sheet name on everything you print

Here is a nifty trick that my boss developed a few years ago, and is now coming in very handy for me:

Input the following formula into a cell: "=CONCATENATE(TEXT(NOW(),"dd mmmm yyyy"), ", ", CELL("filename"))" without the outer quotation marks. This displays the current date, file name and path in the cell.

"=RIGHT(CELL("filename",A1),(LEN(CELL("filename",A1))-SEARCH("]",CELL("filename",A1))))" without the outer quotation marks. This reads the file name, looks for the "]" character, and displays the text to the right of it - which happens to be the sheet name.

No comments: