Revised B2 cell formula
Drag it down.
The above formula referenced for 100 rows and perform calculation based on the reference so if you would like to apply it for more rows then resize it to your desired range.
Added some if functions to make the formula run faster comparing to previous suggestion.
Regarding the Cancel button issue – I tested it and it happens when you do COPY PASTE and after that if you do any change then it alerts you for wrong input and clicking the cancel button accepts the wrong entry. But it wont accept wrong entry if you type it MANUALLY instead of copy paste. If you type it manually then it will clear the wrong entry from the cell when pressing Cancel button.
If you would like to restrict the users from doing copy paste from the Column-A then add the below code in sheet module which will disable doing copy paste in column-A data.
Do right click in Sheet Tab and copy and paste the below code.
Refer the attached files for details.
Hope this helps!
Bookmarks