Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validate existing data in Excel

Status
Not open for further replies.

micang

Technical User
Aug 9, 2006
626
US
Excel 2003

Hi All,

I am very new to VBA, was hoping maybe somebody can lead me in the right direction.

I have an excel sheet (with existing data) that I would like to run code to check certain columns contain valid data.

For example I have a few colums that can only have numbers. How would I go about writing code to : Run through a column cell by cell, if it comes across a text value in the cell, then a msg pops up allowing the user to either delete it, or amend the value(also, it should ignore blanks/nulls), then it continues until the end of the column. (There is a column that has a value in every cell, I was thinking maybe this can be used to determine the range).

Is this to complicated for a novice VBA person, or can it easily be done?

Many thanks in advance.

Michael


 
You may not need code.
Have a look at Data,Validation

Once the validation criteria are set then
Tools,FormulaAuditing,Show Formula Auditing Toolbar
and click on the the button to "circle invalid data"

hope this helps,


Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top