Hello again,
I have tring to fect a solution on the net from few weeks but fail to get it. That is why i am posting my problem here in hope someone will help me.
I am always receiving a big list which is containing incorrect information usually. So, I want a help from this site experts to create a VBA Macros which will be named as ERROR LOG FILE. The script should generate a new workbook for the entire error records and which will highlight cell for wrong entry for a particular record.
In column B only M or F letters are allowed. If more than 1 letter i.e. Space, Special character or any value which is not match to these 2 letters i.e. M or F then copy complete row to a new workbook with remarks will be added in column G & should say “Only 1 letter (M or F) is allowed as gender”.
In column C only VIP, A, B & C is allowed. If any character which is not matching to these 4 items then copy complete row to a new workbook with remarks will be added in column G & should say “Only VIP, A, B & C is allowed in class”.
In column D only 3 numeric values i.e. 0 to 999 is allowed but no spaces. If more than 3 numeric value then copy complete row to a new workbook with remarks will be added in column G & should say “Only 3 characters or numeric values are allowed in Age”.
In column E only 3 words is allowed i.e. Employee, Spouse & Child. If any value in this column which doesn’t match with these 3 words then copy complete row to a new workbook with remarks will be added in column G & should say “Employee, Spouse or child is allowed in this column.
In column F only 5 words is allowed i.e. African, Asian, Middle East, Saudi & Other. If any value in column F which doesn’t match with these 5 words then copy complete row to a new workbook with remarks will be added in column G & should say “African, Asian, Middle East, Saudi & Other is allowed in this column.
Now the conditions. If the above mentioned 5 points have any error in any of the columns then it will copy complete row of error record to a newly generated workbook with remarks as mentioned above. Spaces, special character, spaces are not allowed i.e. only exactly match values are allowed otherwise the row will assume as error in record and copies to error log file which will be generated by your script.
Copy of original list, sample of accepting output is attached for your refference.
Bookmarks