Abstract:
OBJECTIVE To introduce the application of Visual Basic for Applications (VBA) in Microsoft Excel in essential drugs data statistics in hospital. METHODS The macro-program written in Excel VBA was built to selected essential drugs. Then, the use rate and sales ratio of essential drugs was calculated by PivotTable. RESULTS The macro-program based on VBA in Microsoft Excel could automatically screen essential drugs, and PivotTable could quickly calculate data of essential drugs. The whole process was faster, easier and more accurate compared with manual operation. CONCLUSION A new method of screening and calculating essential drugs based on Excel VBA is feasible, greatly improving the work efficiency.