Access iconAutomation iconExcel icon

Check Access table(s) from Excel using Automation – Updated Code

Here is the revised and completed code that I posted yesterday. The DAO declarations are moved outside the Sub procedure and the 'Set' statements are outside the function loop. Also, the table & column headers are now passed as arguments to the function, making the code more compact. The speed increase over yesterday's code is significant.

Continue Reading: Check Access table(s) from Excel using Automation – Updated Code »

Access iconExcel iconVBA icon

Check Access table(s) from Excel using Automation

Finally, with some help from the good folks over in the microsoft.public.access.modulesdaovba newsgroup, I was able to complete my code to search an Access database for some information stored in an Excel worksheet.

Continue Reading: Check Access table(s) from Excel using Automation »

Excel icon

Counting Unique Occurrences in an Excel Spreadsheet

This formula, entered as an array (Ctrl-Shift-Enter) in a single cell, will show you if there any duplicate entries in a given range (in this case, A1:C100). It is wrapped in an IF function to provide a friendly message; a kind of in-cell error handling, if you will. I usually do this when I know others are going to use the formula, to make it easy for them to understand the output. Otherwise it just gives you the number of unique entries which some people may not know what to do with.

Continue Reading: Counting Unique Occurrences in an Excel Spreadsheet »

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 »

Excel icon

Formula for Date/Time Subtraction in Excel

This formula will show the difference (in hours) between two cells with date/time values.

Continue Reading: Formula for Date/Time Subtraction in Excel »

Excel School