Monday, July 26, 2021
In VBA, you'll save time and frustration by always declaring your variables and by also using Hungarian notation. Here's why and how to do that.

Declaring Variables in VBA: Three Keys for Success

A recent post in an Excel forum included some VBA code and asked why the code kept failing. The first few lines of code...
Read a Text File with VBA in Excel, and Write the Text to a Spreadsheet

Read a Text File with VBA in Excel, and Write the Text to a...

"I need to write a text file into one row of my Excel spreadsheet, cell by cell, 20 characters at a time. It's urgent....
It makes sense to document your VBA programs. Here are four easy ways to help yourself and others know what your VBA programs are trying to do, and why.

Corporate VBA Standards for Excel Users Who Program

(Update: To see an illustration of the points I discussed here, see Read a Text File with VBA, And Write the Text to Excel.) In most...
Here's how to use both VBA and iterative calculations to update your workbook in response to DDE updates. Also includes ideas from other Excel MVPs.

Track Dynamic Data with VBA or with Iterative Calculations

"My A1 cell changes value every minute because it imports data from a DDE server. To keep historical data, I would like to list...
This simple VBA procedure finds the precise time it takes to calculate a workbook. You can use it to test competing workbook design methods.

Use Excel VBA to Test Report Calculation Times

I once exchanged email with an experienced Excel jockey who insisted that VLOOKUP was Excel’s fastest lookup method. It was even faster, he said,...
Excel tracks many worksheet properties that formulas don't return. But you can fix the problem in VBA by writing a UDF, a User Defined Function.

Use VBA Functions to Return Excel Document Properties

"I would like to add a small formula-driven reference in my Excel worksheets that: (1) Automatically notes the original author/user (or last modifier) of...
When you record VBA macros, Excel records each item you select. Here's why and how to avoid selecting those objects in your actual macro.

You Usually Don’t Need to Select an Object in Excel VBA

An Excel VBA user asked in a forum recently how to select a sheet in VBA when the sheet name is stored as a...

Latest Articles

Excel users made such a mess of nested IF functions that Microsoft created the IFS function to help. Here's how to tame both functions.

How to Tame Nested IF Functions in Excel

When I review my Excel formulas from many years ago, one of the types of formulas that I'm most embarrassed about today is the...
Excel's STOCKHISTORY function can return decades of history about the prices of stocks for thousands of public companies from many countries. Here's an introduction to that function.

Introducing Excel’s STOCKHISTORY Function

The STOCKHISTORY function recently showed up in my non-beta version of Excel 365. Its appearance was a surprise because it wasn't announced as a What's...

A Lesson in Excel Analysis Learned from Rising US Inflation

Looking at the trends in the annual rate of change (ROC) of business and economic measures is an excellent way to reveal hidden information...
Advertisement
Advertisement