If you’re like me you name your worksheets in Excel to help make more sense of the data. I try to incorporate a universal header in most of my Excel documents so this script helps me.
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
Example:
Say you have an Excel file to log all the domains you manage and the DNS that goes with each domain.
First worksheet could be the list of domains with basic creation/expiration dates and other quick reference information then click on the domain name and it takes you to a separate worksheet to give more detail on that domain.
This code below would lookup the specific domain name that you have selected and provide a basic header.
="DNS Records For - "&MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.