Office challenge: What VBA formula would you use to select the first empty cell in an Excel spreadsheet?

Learn the solution to last week's PowerPoint selection challenge and test your Excel skills with this week's VBA challenge.

Entering new data into an Excel spreadsheet is a common task. There are many steps to automating data entry and they depend a lot on the specifics of the task at hand. However, one of the first things you'll want to do is select the first empty cell in the spreadsheet. What VBA formula, function, or macro would you use to select the first empty cell in a spreadsheet? This challenge is wide open as there's certainly more than one way to approach this solution.

Last week we asked…

How can you quickly select the contents of a PowerPoint text box? This has been a fun challenge. Your responses were creative, but I have one more than no one mentioned—press [Esc]. After adding a text box to a slide and typing a label, clicking a formatting option, such as Bold, Italics, and so on, has no effect—nothing happens. If you press [Esc] and click a formatting option, PowerPoint applies the format!

When you press [Esc], you probably won't see an obvious indication that PowerPoint has selected the text, but don't let that trick you into thinking that this simple technique doesn't work. The control's border does change, but it's subtle and you might miss it, so watch for it.

This technique also works with existing controls—it isn't just for new ones. Simply select a control, press [Esc] and start formatting.


Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.

Editor's Picks