ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filter, sort, filter and then display (https://www.excelbanter.com/excel-programming/293742-filter-sort-filter-then-display.html)

Andrew[_38_]

Filter, sort, filter and then display
 
This is the scenario. I need to filter the worksheet data with a criteria that is in Column A
After that I need to sort the values in Column B in ascending order then display those values in another shee
Those values should also be unique so if there are duplicate entries, the duplicate is discarded. How can I do that in VBA



arno

Filter, sort, filter and then display
 
Hi Andrew,

just one thought: A sorted list is always sorted no matter if it is filtered
or not. Turn screenupdating off, sort your list according to A *and* B,
filter, do whatever you like.

arno

This is the scenario. I need to filter the worksheet data with a criteria

that is in Column A,
After that I need to sort the values in Column B in ascending order then

display those values in another sheet
Those values should also be unique so if there are duplicate entries, the

duplicate is discarded. How can I do that in VBA?



Tom Ogilvy

Filter, sort, filter and then display
 
this page on John Walkenbach's site can be adapted to what you want to do

http://j-walk.com/ss/excel/tips/tip47.htm

Just add a check for your filter condition. You don't actually have to
apply a filter.

Then write the contents of the collection to the cells in the destination
location rather than to a listbox as shown in the code.

--
Regards,
Tom Ogilvy

"Andrew" wrote in message
...
This is the scenario. I need to filter the worksheet data with a criteria

that is in Column A,
After that I need to sort the values in Column B in ascending order then

display those values in another sheet
Those values should also be unique so if there are duplicate entries, the

duplicate is discarded. How can I do that in VBA?







All times are GMT +1. The time now is 10:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com