Ever typed a discount like 15 into a cell and watched Excel display it as 1500% instead of 15.00%? This tutorial fixes that exact headache by wiring a Worksheet_Change event into your sheet so every whole number you enter in the Discount column gets rewritten as a proper percentage automatically. You'll walk away able to set up a self-correcting Discount column that converts 15 into 15.00% and 7.5 into 7.50% the moment you press Enter.
Covered inside:
→ Opening the VBA editor from the Developer tab and locating the correct sheet module
→ Swapping the default Worksheet_SelectionChange stub for a Worksheet_Change event
→ Pasting in the rewrite logic and walking line-by-line through Intersect, Target.Cells.Count, IsNumeric, and IsEmpty guards
→ Understanding why Application.EnableEvents = False prevents infinite recursion
→ Saving the workbook as .xlsm after dismissing the .xlsx warning
→ Testing the macro on B2, B3, and B4 to confirm rewrites and the empty-cell guard
Would you have kept the IsNumeric check, or extended the macro to also handle decimals already entered as percentages? Drop your take in the comments.
#ExcelVBA #WorksheetChange #ExcelMacros #ExcelTutorial #VBAProgramming #ExcelTips #ExcelAutomation #PercentageFormatting #EventMacros #xlsm #ExcelDevelopers #ExcelTutorial2026