Hi

Have a look at some of these links for a basic understanding of VBA

Excel VBA Basic Tutorial 1

Excel VBA tutorial