VBA function to filter across multiple columns

milkychips

New Member
Joined
Jan 21, 2016
Messages
12
A2:D8

I would like to have a piece of code that helps me to only display rows that contain the value in cell E1.


Column ABCD
Row2Cat1Mouse2
Row3Dog3Horse7
Row4Squirrel8Cat4
Row5Bat3Chicken8
Row6Dog2Squirrel0
Row7Duck1Horse4
Row8Cat6Koala3

So if E1 contained the word "Cat"
only the following rows would appear


Column ABCD
Row2Cat1Mouse2
Row4Squirrel8Cat4
Row8Cat6Koala3

 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Do you want to hide or deleted the rows that don't contain the value in E1, or copy the matches to another location?
Also, is column A and C the only columns to check?
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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