select records with a specific value

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

Guest

How can I select only those records with a "1" in col A and highlight only
col C of the same record(s) for copying? I'd like to put this in a Macro.

Thanks
 
Al,

Columns("A:A").AutoFilter Field:=1, Criteria1:="1"
Intersect(Columns("C:C"), ActiveSheet.UsedRange) _
.SpecialCells(xlCellTypeVisible).Copy

HTH,
Bernie
MS Excel MVP
 
entered your suggestion into a macro as follows:
Columns("A:A").AutoFilter Field:=1, Criteria1:="1"
Intersect(Columns("C:C"), ActiveSheet.UsedRange _
.SpecialCells(xlCellTypeVisible).Copy

Will not run?????
Please let me know if i'm misrepresenting something.
Thanks
 
Al,

What error messages do you get? Is the sheet of interest active at the time?
Are you using a commandbutton, or using Tools / Macro/Run? Where did you
put the code?

Bernie
 

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