I wish to filter a table and have the results appear on another sheet by VBA, but I would like to know if there is some way to enter the criteria as a formula instead of a range.
My table is about 15 columns wide, and I wish to filter for all the items in the table column labeled "Key" that are equal to a specified value. I can easily enough start at the target sheet (where I wish the filtered results to appear) and over in cell Z1 label it "Key" (Without quotation marks) and in Z2 enter the key number that will appear in all the records I wish to extract, so the vba for the process would look something like:
...but this seems kind of convoluted to me in that I would first have to write the column header and value to Z1 and Z2; it seems we should have a way of telling the CriteriaRange to look for all values in tblPeople[[#Headers],[Key]] that are equal to a value, yet I have not stumbled on the correct syntax if there is one.
Thoughts?
Thank-You, Merry Christmas and Happy New Year!!!
Bookmarks