macros - Find a list

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm new to macros and excel........

I have several excel spreadsheets that I need to filter daily. I would like
to create a macro that can segment the system_ID with only the following
numbers: (761,628,633,638,773,644,655,660,781,661,712,799,605).

What I would like to happen is everytime I receive a spreadsheet filter by
selecting the macro to group these numbers into a separate worksheet or
something else that is visual.

thanks!
 
Util,

If your system ID's are in column A, with a header in row 1, you can filter
the sheet by using the macro below.

HTH,
Bernie
MS Excel MVP

Sub Macro1()
Range("A1").EntireColumn.Insert
Range("A1").Value = "Show"
Range("A2:A" & Range("B65536").End(xlUp).Row).FormulaR1C1 = _
"=NOT(ISERROR(MATCH(RC[1]," & _
"{761;628;633;638;773;644;655;660;781;661;712;799;605},FALSE)))"
Range("A:A").AutoFilter Field:=1, Criteria1:="TRUE"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top