Excel column to add as filter

Rayne used Ask the Experts™
Hello All,

I have tried to add a new column to the table -[info]
I just want to add an extra layer of filter to the copied information. I have included a checkbox [onTeam] on the first sheet. The moment I click on that checkbox (onTeam) – it throws an object mismatch error. Please help and suggest any changes needed to ensure I properly add the extra column and then filter the data with that extra column as filter criteria by correctly updating the VBA code as well. I even expanded the criteriaRange to the new filter but the error persists

Thank You
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The problem is that in this line

Set rChange = [info_Range].Cells(Right(strTmp, 1), 2)

strTmp is "onTeam", and Cells(m,2) has no meaning. I'm not sure what you're trying to achieve - can you elaborate?


Hello Stephen,
The goal is that when I click on the onTeam checkbox it filters the data that has only onTeam in the corresponding column. When I click the checkbox, it should put a 1 in the truth table (X4) which the filter then uses to organize/update the data accordingly…
What if you just split that one line into two?
Case "onTeam":
Set rChange = [info_Range].Cells(1, 2)
           Case "someTeam":
Set rChange = [info_Range].Cells(2, 2)

Open in new window


Yes, it does work now, Thank you!!!! Stephen, greatly appreciate you help :)


Quick and awesome help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial