select records with a specific value

A

AMK

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
 
B

Bernie Deitrick

Al,

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

HTH,
Bernie
MS Excel MVP
 
A

AMK

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
 
B

Bernie Deitrick

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
 
Top