|

Should I use a VBA Macro Function or Call a Worksheet Function?

If the function you want to use exists in Excel VBA, use that.  It will be faster and cleaner, and work in all Microsoft Office programs, not only in Excel.  Here is a full list of Excel VBA Functions.  If the function you want is not there, but exists in the Worksheet, you may be…

| |

How to Use a Worksheet Function in a Macro: Proper Case Names

In some cases, VBA does not have a specific function, but the Excel Worksheet does. This Excel Visual Basic (VBA) code example demonstrates: How to call that Worksheet Function from a Macro. In this particular example, how to call the Worksheet Function =PROPER() from VBA. The function to downcase parts of surnames that normally appear…

|

Flowchart: Which Excel LOOKUP Function Should I Use?

When you want to look up data in Excel, you can choose from various functions: LOOKUP (in two forms), VLOOKUP, HLOOKUP, and the combination of INDEX(MATCH). Which should you use?  Here’s a flowchart to help guide you: The first and most important question is, “do you want an exact match or an approximate match?” If…

Use INDEX(MATCH) instead of an Excel LOOKUP Function

For some lookups, the INDEX and MATCH functions used together may be the solution.  Together, they are more robust and versatile than VLOOKUP, HLOOKUP, and LOOKUP. MATCH returns the position of the matched item in a one-dimensional list. It can do an exact or approximate match.  MATCH(lookup_value, lookup_array, 0) does an exact match. INDEX returns…

Data Tables in Excel

What are Data Tables for? I’m glad you asked. Data Tables are a subset of “What if” analysis. You can try different data inputs and see the results in a Data Table. Data Tables in Excel are on the Data ribbon, in the Forecast group, in the What-if Analysis dropdown list. Goal Seek and Scenario…