Access icon

Trim all text fields in MS Access database

I recently had a need to trim fields in a table in one of the databases I use. Borrowing code from a newsgroup post, I was able to come up with VBA code to trim all the text fields in all the tables in a database (2003 MDB).

Continue Reading: Trim all text fields in MS Access database »

Excel icon

Clean up your Worksheet

In Which macro shortcut keys do you use I posted the code I use to clean up my worksheets. Since then I've revised the code somewhat. The fact that my computer crashed and I lost my personal.xls workbook had absolutely nothing to do with this decision.

Continue Reading: Clean up your Worksheet »

Excel iconVBA icon

Formatting Zip+4 Codes

If you have a column of zip+4, this macro will remove the suffix. Simply highlight the cells in question. It will skip any zip codes that don't have the suffix. It uses the Left$ string function which is more efficient than the standard Left() and always returns the first 5 characters in the cell.

Continue Reading: Formatting Zip+4 Codes »

Site last updated: February 8, 2012