How to Convert MS Excel Formula to VBA Code

Home More Excel (VBA) Training Videos

Jasmine send us an email with the following query:
I'm learning Excel VBA. How can I convert a standard formula like the one below to Excel VBA?
Please help!!! Thanks

We have discussed the countif function in detail. It counts the items based on a specicific crieria. Now let's see how we can convert this countif function into VBA code. We have also attached the converted code to a command button so that the macro's use becomes even more user-friendly.

Watch the Excel training video below to see how the conversion of the excel formual to VBA code or macro is done: