Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default finding data within a range

hi,

hi i want to filter out a list od data to much a certain criteria, i
currently use

Selection.AutoFilter Field:=6, Criteria1:=exchange

exchange is a variable, this works fine and it filters ok, but how cn
i copy the filtered data and paste to another part of the sheet.
once the data has been transferred somewhere else i display it in a
userform.

regards

Johny5

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default finding data within a range

John

Hopefully this will help. It doesn't contain the code to filter, but you
already have that, but it does define a range (myRng) and then after
filtering, it uses the SpecialCells method to copy the visible cells only
and move them to A1 on sheet2

Sub MoveVisibleCells()
Dim myRng As Range
Set myRng = Range("A2:G6")
myRng.SpecialCells(xlCellTypeVisible).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS

wrote in message
oups.com...
hi,

hi i want to filter out a list od data to much a certain criteria, i
currently use

Selection.AutoFilter Field:=6, Criteria1:=exchange

exchange is a variable, this works fine and it filters ok, but how cn
i copy the filtered data and paste to another part of the sheet.
once the data has been transferred somewhere else i display it in a
userform.

regards

Johny5



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
Finding Data in a range Southwick Excel Discussion (Misc queries) 3 June 21st 08 03:11 AM
finding a max date in a range in vlookup data Graham Excel Discussion (Misc queries) 5 March 22nd 07 12:02 PM
Finding a value associated with a range Raymond Gallegos Excel Worksheet Functions 5 November 25th 05 08:38 PM
Finding min/max of adjacent data in a range of cells Paul987 Excel Worksheet Functions 5 July 15th 05 08:02 PM
Finding data in a Range / Returning Cell Location Betsy Jones Excel Programming 2 August 8th 03 10:10 PM


All times are GMT +1. The time now is 11:39 PM.

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"