General discussion
March 10, 2003 at 01:59 AM
gcheels

Data verification

by gcheels . Updated 23 years, 6 months ago

I have an Excel spreadsheet I would like to export data out of to Access. The only problem is that the data to be exported changes occasionally. I would like to write a macro that looks at a cells’ contents and verifies that a text entry is there and it is the one I expected, continues on to the next cell to verify what is there. If the data doesn’t match, I would like to display a message and stop the macro execution. The data would look similar to this:

Denver 450 250
Atlanta 350 150
New York 500 200

I want to verify that Denver is in cell A1, Atlanta is in cell A2, New York is in cell A3.

If it is, continue with the data export. If it is not, display a message stating that “Data is not formatted correctly” and stop macroexecution. Thanks.

This discussion is locked

All Comments