PDA

View Full Version : Sleeper: Cell reference for Duplicates



Zuid-Holland
06-27-2005, 11:29 AM
Dear All,

I am the first timer for excel-vba and am entrusted with this huge diffi task of uploading thousands of rows of validated data through the excel templates. Performance (macro-validation-performance) is a key issue.
The end-user uploads the data something like:
"ID, Tier, Type, Name, etc etc". There are validations like the ID should be unique, if Tier is some value-then Type cannot be certain value(s) and the like, to present to you with a clear picture. I want to know:
"How to identify the duplicate entries in the column, get the cell-reference of those errors and write that on a separate error-sheet for the user, so that he knows where all he has provided wrong data. The user may enter data, copy data or etc. Also, since the performance is a key issue, reading a row - making a range on that col - looking for same value is not a good idea."

I would really be obliged to anyone who could help me out with this and also with some pointers, if possible.

I really appreciate your taking time and thanks a million!!

Regards.

austenr
06-27-2005, 01:36 PM
Can you upload a sample file for us?

Zuid-Holland
06-27-2005, 10:56 PM
Hi,

Thank you so much for replying.
I have attached the sample template.

The end-user is free to enter data the way he/she wishes to i.e. type/paste/import etc. The server-side program reads the validated template - the 'validate' button (not shown) is provided near the legend which, when clicked triggers the macro that does all the validations and writes the errors, if any. The validations, primarily, are: no repetition of data for No. & ID, mandatory fields are not blank, data format of the field is as specified in the legend etc...

Instead of validating row-wise, I think if i could validate the entire data (range) column-wise and then show the user errors in a separate sheet, say, "error-sequence no., cell address, mssg", will have better performance than reading each row and validating each cell for data format as well as unique value.

Perhaps i need to use array or dictionary to store the cell address for each error-cell in a column ....and then read from this storage object in another sheet to display list of error-cells with mssgs to the end-user.

I hope i have been able to clearly state my problem ...i need help in implementing the above....

I thank you profusely for taking time in replying to this....

Eagerly waiting for your response...

Thanks & Regards.