View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
lilianld lilianld is offline
external usenet poster
 
Posts: 10
Default Search the column and return a cell value

Hi Jef,

Thanks for trying to help.
The macro works great. Does the job but I did not delete anything on sheet2
because it contains tables.



"Jef Gorbach" wrote:

Give this a shot:

Sub test()
Cells.AutoFilter field:=1, Criteria1:="a"
Cells.SpecialCells(xlCellTypeVisible).Copy _
Destination:=Worksheets("Sheet2").Range("A4")
Application.CutCopyMode = False
Cells.AutoFilter 'turn off filter
Worksheets("Sheet2").Columns("A:B").Delete 'since we only want
column(c) values
End Sub



.