Hello:
Please refer to attached file.
I need VB Code to filter column A so that all sizes (end of item Name) are grouped together
Let me know if you have any questions.
Thanks.
Riz
Hello:
Please refer to attached file.
I need VB Code to filter column A so that all sizes (end of item Name) are grouped together
Let me know if you have any questions.
Thanks.
Riz
Can not you use the auxiliary/helping column for these capacities, measures ?
Last edited by mjr veverka; 05-21-2019 at 03:48 PM.
Hi Riz
Perhaps this...Adapted from jindon's code...
Please Login or Register to view this content.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
Hello Riz,
As with any sorting procedure, there are always some exceptions to the rules. Here are the three I found in your workbook: JIM BEAM LTR, JIM BEAM DISTILLER'S CUT 750, and JIM BEAM APPLE. The remaining data can be sorted in ascending order (case is ignored) like this: 50ml, 100ml, 200ml, 375ml, 750ml, 1000ml, 1L, 1.75L . A normal text sort will not produce these results, smallest to largest. To achieve a sort like this requires a Custom Sort list.
The attached workbook contains two macros. The first macro checks if the Custom Sort List exists and creates it if it does not exist and then returns the position of the new sort list in the Sort Lists used by Excel. The second macro removes the size information using Regular Expressions, places this in a helper column (the column on the right side the original list) and then sorts the data using the Custom Sort. There is a button on "Sheet1" to run the macros.
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Perhaps this amended code could also work...Not sure what desired output should be...
Please Login or Register to view this content.
Last edited by sintek; 05-23-2019 at 03:58 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks