Handy Tip: Date when a SQL Database was restored
I recently had to confirm when a database was restored. The information is in the MSDB database, and here is the SQL you can use to get the restore history of all the databases on the server: USE msdb; SELECT DBRestored = destination_database_name, RestoreDate = restore_date, SourceDB = b.database_name, SourceFile = physical_name, BackupDate = backup_start_date […]
Handy Tip: sheetname without using VBA
=MID(CELL(“filename”,A1:A1),(FIND(“]”,CELL(“filename”,A1:A1))+1),(LEN(CELL(“filename”,A1:A1))-FIND(“]”,CELL(“filename”,A1:A1))+1)) =CELL(“filename”) will return the sheet name at the end of the file’s path. For example: C:\My Documents\[PhoneNumbers.xls]Phone You can then use crazy string magic to get the sheetname from that information. Pretty cool hey? I needed to get the active sheetname to do a vlookup using the sheetname and found this formula at http://www.computing.net/answers/office/excel-sheet-name-in-cell/2868.html […]