GetFormat converts the referenced cell format to text. This code was taken from here. I changed it to use NumberFormatLocal as NumberFormat wasn’t producing the expected results e.g. where I was expecting #,##0;[Red]-#,##0, GetFormat was returning #,##0_);[Red](#,##0)

Function GetFormat(Cell as Range) as String
	GetFormat = cell.NumberFormatLocal
End Function

How to use:

  1. Copy code.
  2. Open workbook to copy code to.
  3. In Excel, press Alt + F11 to open the VIsual Basic Editor (VBE).
  4. Click the Insert menu.
  5. Click Module.
  6. Paste code in right window.
  7. Press Alt + Q to close the VBE.

A recent project I worked on required a number of Excel risk reports to be the analysed, reverse engineered, and specified. The output of the analysis included an Excel specification comprising many interdependent sheets. I found navigation of the specification quite awkward, particularly because there were many cross references and interdependencies, and there was no was to go back after following a hyperlink.

In order to ease navigation I wrote a Table of Contents (TOC) sheet which, once inserted into a workbook, would automatically update itself with the names of the sheets in the workbook, convert these names into hyperlinks, and, by using a configurable cell reference, include a description of each sheet. I also included a link back to the TOC in every sheet.

It’s not perfect, but then what is? see the Wiki for details.

GetFormula converts the formula referenced by ‘cell’ to text. This code was taken from here.

Function GetFormula(f As Range)
    If f.HasFormula Then
        GetFormula = f.Formula
    Else:
        GetFormula = f
    End If
End Function

How to use:

  1. Copy code.
  2. Open workbook to copy code to.
  3. In Excel, press Alt + F11 to open the VIsual Basic Editor (VBE).
  4. Click the Insert menu.
  5. Click Module.
  6. Paste code in right window.
  7. Press Alt + Q to close the VBE.

I came across the following whilst researching network storage and backup solutions.

A: Because the whole purpose of a RAID is to make sure that nothing in the world can interrupt that accidental rm -rf / (or DELTREE /X C:\), not even yanking the power cord in panic.

Q: But what's the difference between redundancy and a backup?

A: If you accidentally overwrite your PhD thesis with garbage, redundancy ensures that you have multiple copies of garbage, in case one gets bad. A backup ensures that you can restore your PhD thesis.

(And an archive ensures that you can retrieve multiple older versions of your thesis, and a version control system also tells you why you made a new version in the first place.)

© 2011 Bookmarked IT Suffusion theme by Sayontan Sinha