Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate 2-column Advanced Autofilter?

Status
Not open for further replies.

vegybrgr

Programmer
Jan 23, 2005
12
US
This is the need: calculate and display unique values across 2 columns of input data automatically and output them to a pair of adjacent columns. This is just finding a way to perform the Advanced Autofilter / Unique Records function to output just those distinct pairs of values to a defined location. I'm not a VBA writer. This needs to happen upon a change in the data in the first two columns, so on an autocalculated basis. Using Excel 2007...

Example:

Col A Col B
Fred 971
Fred 971
Fred 905
Fred 905
Ethel 326
Ethel 326
Ethel 110
Mona 405

So, Optimal Output would be to 2 other columns:

Col C Col D
Fred 971
Fred 905
Ethel 326
Ethel 110
Mona 405

No other solutions within my wee grasp seem to work.
Thanks for any thoughts.
Veg
 




Hi,

Data > Filter > Advanced Filter --

Copy to another range
Unique Values

Vola!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks--that's exactly the result I'm looking for, but I need it to happen automatically. I should have been clearer: the range of data in the input colums A and B gets updated periodically, and I need the FIlter> Advanced filter with UNique values to automatically recalculate and update what is in the output Range. I can take those steps manually, but this has to execute each time that the data dynamically changes.
Thanks for your reply and suggestion.
V
 




Check out the Worksheet_Change event.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top