I have a spreadsheet with two tabs, one which I've named Summary (currently blank) and one named Company List which has a few thousand lines in it.  Column H on the Company List tab has a classification with the following categories:

Not Yet Sorted
Hot Prospect
Qualified Suspect

I'd like to create a button in the summary tab whereby if column H is neither "Not Yet Sorted" nor "N/A" then columns A through L get pulled into the Summary tab, otherwise ignored and the rows without data get skipped.  Is that doable?

Surprisingly short macro, runs quite quickly:

Assign your button to run this code:

Sub BringIn()
   Range("Q2").Value = "=AND('Company List'!H2<>""Not Yet Sorted"",'Company List'!H2<>""N/A"")"
   Sheets("Company List").Range("A1").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
       CriteriaRange:=Range("Q1:Q2"), CopyToRange:=Range("A1:L1"), Unique:=False
End Sub
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Bob Umlas


I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/


Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Excellence, The Expert, Microsoft

BA in math, Hofstra University, 1965

Awards and Honors
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks

©2016 About.com. All rights reserved.