PDA

View Full Version : Search on MULTIPLE column using VBA



cydiicy
07-13-2017, 08:08 PM
I've been wondering how to filter data with two columns.

For example, I ONLY want to filter data that are CS (COURSE) with a GRADE of 900.

These are the columns.

|---ID---|---NAME---|---GRADE---|---COURSE---|

Can you please help me work this out? What should I use for searching? I've used shape as textbox on my recent filter data.

Thank you!

p45cal
07-14-2017, 02:14 AM
Supply a file (a workbook) with the setup and perhaps a bit where you show the result you want.
At first sight, an autofilter should do the trick.
Do you want to filter in-place, or to another location?

mdmackillop
07-14-2017, 02:28 AM
Sub Test()
With ActiveSheet.Range("A:D")
.AutoFilter 3, 900
.AutoFilter 4, "CS"
End With
End Sub