somnath6309
New Member
Dear Friends,
last time due to some internet problem, I was unable to upload properly my requirement.
Please find enclosed herewith an excel file. The sheet1 is the table that should be sorted.
Most of the persons in Col B are same as persons in Col C. Actually the names may differ e.g. Dave and Dave L, Peter G and Peter etc.
We have to sort the range C1 to C13 with respect to the elements in B1 to B13. Following are the requirements:
I. Compare each element of range C1:C13 with each element of Range B1:B13 with the help of vba LIKE Operator.
II. If one element of col C approximately matches with one element of Col B, then the matching elements will be arranged side by side and hence, the range C1:C13 will be sorted with respect to range B1:B13
III. There are elements in both the columns that does not match each other e.g. SOMNATH, SOURAV, ASIM etc. In Col B & ANIL, PULAK, ANKIT etc. In Col C. These elements will be kept at last of both the columns.
the finished output (desired) will be found at sheet2 of the same workbook. Is it possible to create a sub/function procedure in vba that can accomplish the task ?
Regards,
Somnath
last time due to some internet problem, I was unable to upload properly my requirement.
Please find enclosed herewith an excel file. The sheet1 is the table that should be sorted.
Most of the persons in Col B are same as persons in Col C. Actually the names may differ e.g. Dave and Dave L, Peter G and Peter etc.
We have to sort the range C1 to C13 with respect to the elements in B1 to B13. Following are the requirements:
I. Compare each element of range C1:C13 with each element of Range B1:B13 with the help of vba LIKE Operator.
II. If one element of col C approximately matches with one element of Col B, then the matching elements will be arranged side by side and hence, the range C1:C13 will be sorted with respect to range B1:B13
III. There are elements in both the columns that does not match each other e.g. SOMNATH, SOURAV, ASIM etc. In Col B & ANIL, PULAK, ANKIT etc. In Col C. These elements will be kept at last of both the columns.
the finished output (desired) will be found at sheet2 of the same workbook. Is it possible to create a sub/function procedure in vba that can accomplish the task ?
Regards,
Somnath