Advanced filter and UDF as input?

Cedric S

New Member
Joined
Apr 21, 2010
Messages
2
Hi
I have a table and I want to use the Advanced Filter to copy to another sheet

This table contains for example<TABLE> <TR> <TD>Column A</TD> <TD>Column B</TD> <TD>Column C</TD> <TD>Column D</TD> </TR> <TR> <TD>Status</TD> <TD>User</TD> <TD>Division</TD> <TD>Call Number</TD> </TR><TR><TD>Open</TD><TD>Peter</TD><TD>13</TD><TD>1</TD></TR><TR><TD>Open</TD><TD>Peter</TD><TD>15</TD><TD>2</TD></TR><TR><TD>Open</TD><TD>Ray</TD><TD>13</TD><TD>3</TD></TR><TR><TD>Closed</TD><TD>Ray</TD><TD>13</TD><TD>4</TD></TR><TR><TD>Wait</TD><TD>Jane</TD><TD>10</TD><TD>5</TD></TR>
<TR><TD>Open</TD><TD>Jane</TD><TD>11</TD><TD>6</TD></TR>

</TABLE>

I want to apply a criteria range for this table as followed:
<TABLE>
<TR> <TD>Status</TD> <TD>User</TD> <TD>Division</TD> <TD>Call Number</TD> </TR>
<TR><TD>Open or wait</TD><TD>Peter or jane</TD><TD>10 or 11 or 13</TD><TD></TD></TR></TABLE>

Is it possible to define such kind of criteria without having x times x unique rows?
I was thinking about an UDF where for example you could say
<TABLE>
<TR> <TD>Status</TD> <TD>User</TD> <TD>Division</TD> <TD>Call Number</TD> </TR>
<TR><TD>{=IsMember(SelectedFilter!A:A)}</TD><TD>{=IsMember(SelectedFilter!B:B)}</TD><TD>{=IsMember(SelectedFilter!C:C)}</TD><TD></TD></TR></TABLE>

this is the result of my SelectedFilter sheet:
<TABLE>
<TR> <TD>Status</TD> <TD>User</TD> <TD>Division</TD> <TD>Call Number</TD> </TR>
<TR><TD>Open</TD><TD>Peter</TD><TD>10</TD><TD></TD></TR>
<TR><TD>Wait</TD><TD>Jane</TD><TD>11</TD><TD></TD></TR>
<TR><TD></TD><TD></TD><TD>13</TD><TD></TD></TR>
</TABLE>

Please note that if you run the above report you would get something different as then it doesnt show open & jane (record no 6)

Somebody who could help me?
Can somebody help me starting with this UDF formula maybe, as i have no idea how to compare the row x (from advanced filter) with my Column A:A (loop over A1, A2,A3, ...) as I would not have an idea what value is in row x
Thanks

Cédric
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Please note that in my real project there could be up to 100 user names and more than 8 search criteria which should be combined with an AND between search criteria type but an OR in search criteria values
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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