What Is VBA? How Do We Use It in Data Validation?

Efe Buyuk
2 min readNov 5, 2020

--

Photo by ETA+ on Unsplash

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;

MS Excel Developer Tab

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?

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Efe Buyuk
Efe Buyuk

Written by Efe Buyuk

Use all your data to make the right decision at the right time, every time. Follow me on LinkedIn https://www.linkedin.com/in/efebuyuk/

No responses yet

Write a response