IThema,
Peter is correct.
You should be using the "Data Validation" utility in Excel to PREVENT incorrect values from being entered in the first place.
(Thanks Pete)
Column by column, select all the cells you wish to validate, typically A2:A65536 (A1 is reserved for the "text" field names)
Click: Data-->Validation
Under "Allow", select one of the "Number" types (Whole Number or Decimal)
Then specify the Minimum and Maximum values.
Click: OK
Now if a user types in text, they will get an error message.
That being said... if you ALREADY have unvalidated sheets ready to import, you could copy this formula down the entire column next to the column in question:
=IF(ISTEXT(A2),"Bad","Numb
Then do a Search for: Bad
Remember to set "Look In" option to "Values"
On the other hand you could use:
=IF(ISNUMBER(C2),"Incorrec
To find all the Text Fields that might contain numbers.
Hope this helps as well
Main Topics
Browse All Topics





by: peter57rPosted on 2006-03-10 at 01:07:11ID: 16152923
Hi IThema,
Importing directly into the destination table is a bad idea if you don't have complete control over the data.
And you cannot expect a fast import if you have to validate every field in every record programmatically.
Can you not validate the data in Excel before you start the import? Is it not possible to use the Data Validation settings in XL to prevent duff data entering in the first place?
If not, then in my opinion you should import into a table of all text fields first, then run queries to check the validity of the data before posting to the final table.
Pete