Wednesday, May 30, 2012

Excel Shortcut: Add Date or Time to Cell

To quickly add current date to active cell press CTRL + SEMICOLON (i.e. CTRL + ; )

To add current time press CTRL + COLON (i.e. CTRL + : )

Monday, May 28, 2012

VBA: Remove All Shapes From Sheet

To remove all shapes from a sheet, use the below snippet:

Sub RemoveShapes()

    Dim s As Shape

    For Each s In ActiveSheet.Shapes
    Next s

End Sub

Friday, May 11, 2012

Excel: Count Unique (Number) Values

To count the unique number values in a range, say for example column A, you can use a combination of SUM, IF and FREQUENCY formulas.


Check the help for more details on FREQUENCY formula.