I need Excel VBA program to validate the cells within a worksheet at they are entered, to ensure that they do not exceed maximum lengths. Could this be done using a Worksheet_Change sub? I am not sure. I have provided a sample XLS that you can look at, which gives good visual understanding of what needs to be accomplished. The validation rules would apply to all columns other than "A", which would be a control column and not a data column. The logic needs to work as follows. Maximum cell lengths for each column are going to be provided from a row that contains a string value of "LENGTHS" in column A. If no such row is found, then validation has been disabled and we just exit the entire process. There is nothing to be done. Otherwise, suppose data is entered into cell C6. When data is entered into a cell, we first want to look at column A for that row. If this cell (in this case, cell A5) has values of "*", "H", or "LENGTHS", then those specific string values indicate that this row is not a data line. Because this is not a data row, cells entered on this row do not need to be validated. No validation is to be done for this cell, so just move on. Otherwise, we have confirmed that we are on a data row, so we need to get the maximum length for cells in this column. As described earlier, these lengths will be defined on the row that contains "LENGTHS" in column A. This means that when data is entered into any given cell, we are always going to look towards the LENGTHS row to get the allowed maximum length for that particular column. In this case of our attached example, we would get the allowed maximum length for column C from cell C5 (since row 5 is the LENGTHS row). If the content of C5 is empty or not numeric, we again exit out of the validation for this cell, since lengths for this particular column are not to be checked. If C5 is present with a numeric value, then that cell value contains the maximum length for this column. We can then check the length of what is entered into C6 against the length obtained from C5. If the data entered into cell C6 exceeds the maximum length which is allowed for this column, then we message that the value entered into C6 is too long. The message should include the value cell address (C6), the value that was entered, the allowed maximum length for this column, and how many excessive characters were entered. The validation process should message and exit when the first problem is found, since that cell must be corrected by the user of the worksheet. Otherwise, the validation needs to continue and loop through all cells as data values are entered. This applies to all columns other than A, and all rows that do not have a value of "*", "H", or “LENGTHS” in column A.
I am expert and I can start now
Just go to my profile and check my reviews from other clients
.......................... .......................... .......................... ..........................
Hello,
I'm fullstack expert, with over 10 years experience dealing with web, I can help create dashboard and database by excel macro.
I've previously worked on the exact similar project for American Rudy employer.
When do you need this finished by? I understand how annoying it is, and can finish this project for you quickly!
Please send me message, so i can understand details for your project.
Waiting for your reply.
Best regards.
Carina
Hi!
I am really interested in this job. I’m data scientist working remotely with various analytical companies.
I’m offering best quality and highest performance at a price we are both comfortable with. I can complete your project on time and your will experience great satisfaction with me.
I’m well versed in R, python, SPSS, Stata, Excel etc
I have rich experienced in Data Entry, Excel, Visual Basic for Apps and Visual Basic.
For more information about me, please refer to my portfolios.
I’m ready to discuss your project and start immediately.
Looking forward to hearing you back and discussing all details..
Thank you!
Hi. I'm a IT professional with good knowledge and experience in excel, VBA macros for automated tasks and pivot tables. Related projects accomplished. I can help you with your project.
Hi
Thanks for your job posting!
I am a Desktop App Developer and your project is very interesting for me.
I am an expert in
✔️C / C++ / C# / Java / JavaFx / Python/QT
✔️VBA / VB / .NET /EXCEL /ACCESS / SQL Database.
One of my top skill is VBA.
I worked on numerous similar projects in the past and always impressed the clients with my excellent solutions. But I have couple of questionsin the requirements, please ping me on chat to discuss more on that.
I sincerely hope this project would be first step in long term relationship with you.
Please give me your detail…
Best Regards.
hi
I am a data entry specialist
proficient in Microsoft Office
excellent typing speed and deliver project on time
having ability to complete tasks
i hope you consider me for your project
Thanking You
Hey there, I see you’re looking for someone for Data entry specialist
I have years of experience in Web Search, Data Processing, Copy Typing, Data Entry and Excel, etc.
I can also edit product images if required and I am well aware of how a Brand works in the Market and what are the needs for it.
I'm interested in your project, Message me so we can discuss details further.
Regards.
I am good in this work and I am a new freelancer and I do the with my great efforts and you will very happy with my work. I need money also please give me this work.
Data Entry Operator responsibilities include collecting and entering data in databases and maintaining accurate records of valuable company information.