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
        s.Delete
    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.

Example:
=SUM(IF(FREQUENCY(A:A;A:A)>0;1))


Check the help for more details on FREQUENCY formula.

Thursday, April 26, 2012

Contextures: When Good Excel Macros Go Bad

"It worked yesterday..." Ever recall using this sentence when working with your Excel and macros? Even worse, saying this to your boss when he's looking your cool Excel dashboard you just sent him.

Check the post When Good Excel Macros Go Bad from Debra Dalgleish @ Contextures for one similar journey - and how she fixed it!

Wednesday, April 25, 2012