How to limit character length using VBA
Hello! I'm in need of some assistance. I have an excel spreadsheet that has numerous fields for data. One of the fields (column BJ) I need to set a limit to allow only one character of data and notify the user if they try to enter more. I’ve been able to set up a data validation rule that takes care of half of my problem. The other issue I’m facing is that some of the data is copied and pasted into the spreadsheet and some if it is data entered. The data validation rule takes care of anything that is being manually entered, but it doesn’t catch the error for anything that is pasted into the spreadsheet. Is there may be a solution using VBA that might catch the accounts that are pasted into the spreadsheet?
Thank you so much for your time and assistance, I greatly appreciate any advice!
the fact that you are asking
the fact that you are asking this question means that there's a big design flaw in your system.
- if you separate data entry and data storage, you will not have this issue..
unfortunately, solutions are ugly, but if you need something to look at, try this:
It tells you how to trap a change event on the worksheet, and do so something with it..