Knowing what you have Autofiltered

Alejo

Board Regular
Joined
May 27, 2005
Messages
61
Hello Guys,

I have a very large table with data from different products around SouthAmerica. Whenever I want to make a certain extraction I use Autofilter which is so far the best way to (in a way) Query the Table, without getting involved with much code. This is cool when filtering a daily query of 3-6 items. However when it comes to more is like you have to write down the fields filtered in order to know what has been queried. Is there a way to have show in a cell what has been selected in AutoFilter?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I get the #Name? error

Sorry but that error is shown on the A1 ...N1 range, where =FilterCriteria(A9) was pasted...

The code is on the "This Worksheet" page in VB, I have also tried pasting it into the Sheet1...

Any clues?
 
Upvote 0
Sorry Amigo

But I have done this (what I´ll write you) and the error remains:

Created new sheet
Pasted on cell A3 the data
Applied AutoFilter
Copied your code
Returned to sheet, view code, paste on Empty module
Copied the =myNewUDF() on A1 and along the fields that are with data & filter

...and #Name? comes up!

What am I doing wrong?
 
Upvote 0
Alejo,

Sorry, the instructions I posted there are generic instructions for creating a UDF in general. The UDF reference in the cell must match name of the function in VBA. So in this case the cell needs to have =udfAFCriteria() as the formula. Sorry for the confusion.

Perdón pero las instrucciones que puse en esa otra discusión eran generales para como crear una función individual. La referencía en al celda tiene que utilizar el nombre de la función que uno puso en VBA. O sea en este caso la fórmula tendría que ser =udfAFCriteria() Favor disculpe la confusión.

Oh, and Nimrod has a point in that Advanced search is a bit more "self documenting". I like Autofilter since I always have a hard time getting the criteria correct with Adv. Filter. For me, the main strength of Advanced Search is that you can "OR" between columns whereas with AutoFilter it's always "AND" between columns.
 
Upvote 0

Forum statistics

Threads
1,224,884
Messages
6,181,571
Members
453,054
Latest member
arz007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top