
In previous sections, we explained how to use Excel, XML and XSD together in order to do data validation. In the last section we covered how to create an XSD file and use it in XML data validation. If you haven’t read it, you can do so by clicking here. Afterwards, you can continue from where you left of.
What Is VBA?
VBA is a programming language which was derived from Visual Basic programming language developed by Microsoft. VBA’s main purpose is to let you write programs for Microsoft Office programs such as Excel. If you need more information about both VBA and Visual Basic, you can check these links from Wikipedia respectively; VBA, Visual Basic.
How Do We Use VBA in Data Validation?
As you remember, there are ways to validate your data once you get it in your Excel sheet. You can export your data as an XML file and make validation via an XSD file. On the other hand, there is another method you can use to validate your data in Excel and that is to use programming with VBA. In order to open VBA in Excel, you need to go to Developer tab and find Visual Basic button in Code section. You can also see it in below image;

Once you open Visual Basic, you are ready to check the data in your Excel sheet by writing code. The good thing about VBA is that once you write your code there, you can use it for your other similar data projects in Excel by copying them and changing necessary parts such as column names etc.
Note: You can also check this blog post and some other interesting topics on my personal web page.
Next: Step by Step: How to Write A VBA Code to Copy Data from One Sheet to Another in Excel?