Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Need help with Criteria1

Hi,

Having a mental block or a breakdown not sure which!

In the following Criteria1 = "2005". What I need it to do is for it to be
the same as "Sheet1!B10" and get year from there. Can't seam to get it to
work. Where am I going wrong?



With
Worksheets("Selected_Agency_Details").Range("A1"). CurrentRegion
.AutoFilter Field:=9, Criteria1:="2005"
.SpecialCells(xlCellTypeVisible).Copy _
Worksheets("Selected_Agency_Year").Cells(1, 1)
.AutoFilter
End With


Thanks for help.

Trev B
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Need help with Criteria1

With Worksheets("Selected_Agency_Details").Range("A1"). CurrentRegion
.AutoFilter Field:=9, Criteria1:=Worksheets("Sheet1").Range("B10")
.SpecialCells(xlCellTypeVisible).Copy _
Worksheets("Selected_Agency_Year").Cells(1, 1)
.AutoFilter
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Trever B" wrote in message
...
Hi,

Having a mental block or a breakdown not sure which!

In the following Criteria1 = "2005". What I need it to do is for it to be
the same as "Sheet1!B10" and get year from there. Can't seam to get it

to
work. Where am I going wrong?



With
Worksheets("Selected_Agency_Details").Range("A1"). CurrentRegion
.AutoFilter Field:=9, Criteria1:="2005"
.SpecialCells(xlCellTypeVisible).Copy _
Worksheets("Selected_Agency_Year").Cells(1, 1)
.AutoFilter
End With


Thanks for help.

Trev B



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofilter - formatting criteria1 data for valid comparison Dennis Excel Programming 2 December 4th 06 06:56 PM
can I use a cell content as a Criteria1 reference in the below Selection.AutoFilter statement? prady Excel Programming 1 July 28th 06 04:27 PM
for...next and criteria1 jafeol Excel Programming 1 June 6th 04 09:12 PM
Auto Filter and Criteria1 variable D.S.[_3_] Excel Programming 2 November 18th 03 04:16 AM


All times are GMT +1. The time now is 11:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"