dimanche 24 juin 2018

inserting cell comments based on multiple logical validations VBA

I have a table which has 4 columns with headers. Column A has the employee names, B has the organization names (the employees have worked in), C has the date of birth and D has the present designation. The number of columns are fixed; however, the number of rows is dynamic. Now I want the logic to check the first date of birth (and then the second one and so on) and then run this through the entire column (date of birth column) to find a match/ matches. The next step will be - wherever this finds a match, there will be additional checks for employee names and organization names. If these three values match for multiple rows, only the first data point (among all the matches) of employee name will have a cell comment "The employee has been with multiple organizations". This will be done for all the rows. Also, kindly note that the employee names and the organization names are not perfect match (there might be little discrepancies on how these names have been reported). Can someone please help me to build the code for this one? I am pretty new to VBA and this seems to be a little complex logic to build on. Also if you could have the comments for the codes, it will be easier for me to learn and change according to my dataset. Thanks a lot.

Aucun commentaire:

Enregistrer un commentaire