I have a page for data entry that I want to automatically convert any data that is a percentage to a whole number (50% to 50 - not to 0.50). I am in the Sheet code (not the workbook) and I can't seem to get this to work. Data will likely be pasted by the user in bulk to a range (B3:H32) though data may not cover the entire range. I want the conversion to happen seamlessly to the user as my userbase will exceed 1,000 users, many of whom are not Excel savvy. When I enter data as a percent in the range on the sheet (using B column only at the moment for testing), nothing happens. Right now, the loop only covers the B column, but ideally, it will cover the entire range. Any ideas of what I'm doing wrong?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B3:H32")) Is Nothing Then
For Each c In Range("B3:B32")
If c.NumberFormat = "0.00%" Then
Application.EnableEvents = False
c.NumberFormat = general
c.Value = c.Value * 100
Application.EnableEvents = True
End If
Next
End If
End Sub