Fordraiders
asked on
revise code to not be case sensitive and add additional sort column in listbox
previous answered question: from fanpages
https://www.experts-exchange.com/questions/28249788/sorting-listbox-with-additional-information-from-current-sheet.html
Sorting a listbox based on a value in a sheet.
Bubble that value to the top of the list.
Then sort by asc or desc in Column 0.
What I need:
Not Case Senstitive on Column 0 value when sorting
After my values have been bubbled to the top.
Then additional items in the list get sorted by Column 0 AND Also Column 3
SEE SHEET ATTACHED.
Q-28249788.xlsm
https://www.experts-exchange.com/questions/28249788/sorting-listbox-with-additional-information-from-current-sheet.html
Sorting a listbox based on a value in a sheet.
Bubble that value to the top of the list.
Then sort by asc or desc in Column 0.
What I need:
Not Case Senstitive on Column 0 value when sorting
After my values have been bubbled to the top.
Then additional items in the list get sorted by Column 0 AND Also Column 3
SEE SHEET ATTACHED.
Q-28249788.xlsm
ASKER
Thanks will check it out...Great stuff !
OK, noted. Thanks for letting me know.
...
Or even adding one :)
...
...by added an additional parameter...
Or even adding one :)
Have you found the opportunity to progress with your review within the last week, fordraiders?
ASKER
no, sorry been on vacation...will look at it today...Thanks
ASKER
fanpages, Yes, the first part is working fine..
ASKER
fanpages, Sorry for the delay in getting back. Everything is fine on the mfgname first part.
"Once this is confirmed, I will address your second requirement (the additional sorting, both on column 0 as is the case presently, & also on column 3)"
Thanks again for the time to complete this.
"Once this is confirmed, I will address your second requirement (the additional sorting, both on column 0 as is the case presently, & also on column 3)"
Thanks again for the time to complete this.
ASKER
fanpages, please let me know status in completing this question please.
ASKER
also having a problem...if the mfgname contains an apostrophe in the name...it will not catch it..
for example:
LOWE'S will not bubble to the top
but LOWES will..
for example:
LOWE'S will not bubble to the top
but LOWES will..
also having a problem...if the mfgname contains an apostrophe in the name...it will not catch it..
for example:
LOWE'S will not bubble to the top
but LOWES will..
Sorry I missed your recent responses, but since my recent (well, from April 2013) return to Experts-Exchange.com (after an extended break as I didn't like the site's redesign a few years ago) I have started ignoring responses to questions with more than a week since the last response.
This is purely because I would sooner be involved in active threads rather than those that may have been abandoned. I saw your responses now as I was reviewing all my open threads for the past month.
...
This aside, if I change my code within the cmdRandomize_Click() event of the "frmQ_28249788" module so that LOWE'S is used...
From:
vntMfgName = Array("LOWES", "HOME DEPOT", "TRUE VALUE", "BARNES", "SAMS", "AMAZON", "AAAA", "ZZZZ")
To:
vntMfgName = Array("LOWE'S", "HOME DEPOT", "TRUE VALUE", "BARNES", "SAMS", "AMAZON", "AAAA", "ZZZZ")
...and then change cell [F13] from LOWES to LOWE'S then I can "bubble to the top" using the "Alphabetically 1st column with [LOWE'S] first, the rest in Ascending Order" entry in the Form's list-box:
Are you seeing something different?
I have attached my modified workbook (with just the two changes I described above) so you can try the same test.
Q-28264352-LOWE-S.xlsm
ASKER
yes, the last suggestion is fine...thanks...
ASKER
lookinf forward to the additional column sorting
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Beautiful work...!!! Thanks very much !
:)
You are very welcome.
Good luck with the rest of your project.
You are very welcome.
Good luck with the rest of your project.
Please find attached an update to the workbook that addresses just the first of your two requirements; namely, "Not Case Sensitive on Column 0 value when sorting".
I thought I would offer the code in two stages to make the transition from the previous workbook easier.
I changed the blnSort_List_Box(...) routine by added an additional parameter, Optional ByVal blnCase_Sensitive As Boolean = True, & added the associated code to act upon this parameter value within the routine.
I also added a Check-box to the UserForm to select (check) if the sort was to be "Case Sensitive" (checked), or not (unchecked).
The revised code from the "frmQ_28264352" code module is as follows:
Open in new window
The worksheet code module, "shtQ_28264352", & the (This)Workbook code module, "wbkQ_28264352", have both changed simply to reference the new UserForm name, "frmQ_28264352".
Please can you check that the modifications within the workbook address your first requirement?
Once this is confirmed, I will address your second requirement (the additional sorting, both on column 0 as is the case presently, & also on column 3).
Thank you.
BFN,
fp.
Q-28264352.xlsm