Monthly Archives: June 2013

Count Distinct Or Unique Values – VBA UDF

A handful of posts ago I looked at some FREQUENCY() formulae which could give a count of distinct or unique values in a given column. The formulae became quite complicated and slow – particularly when dealing with mixed data types – … Continue reading

Posted in Microsoft Excel, Microsoft Office | Tagged , , , , , , , , , , , , , , , , , , , | 6 Comments

VBA: What Type Are Your Constants?

In the previous post we saw a common mistake when declaring VBA variables and used the Locals window to show that variables are Variant types unless you specify otherwise by using: As Type in the declaration, eg. Dim strHello As String A type … Continue reading

Posted in Microsoft Excel, Microsoft Office | Tagged , , , , , , , , | 3 Comments

A Common Mistake When Declaring Variables In VBA

For today’s post I’d like you to imagine that you’re an up and coming VBA programmer who is starting to feel at home with the IDE and language. You’ve read about some VBA best practices which has made you aware of the … Continue reading

Posted in .Net, Microsoft Excel, Microsoft Office, VB .Net | Tagged , , , , , , | 10 Comments

Calculate The Absolute Sum in Excel

A colleague of mine asked me today how to go about using MS Excel formulas to calculate the sum of absolute values from a given dataset. This question crops up quite often on the forums so I thought I’d put together a quick blog … Continue reading

Posted in Microsoft Excel, Microsoft Office | Tagged , , , , , , | 2 Comments