Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to copy filtered list to new workbook.

Hi

Problem 1

I would like to create a button than when pressed would copy a larg
filtered list to new workbook. Currently copy and past
special/values results in memory running out as the entire shee
contains 14,000+ rows. What macro can I use

Problem 2
Does anyone know a good online resource with ready made macros? and
list of all the possible commands that can be used in a macro

Thank

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Macro to copy filtered list to new workbook.

problem 1
data is in column A with the column label at A1

modify this sub to suit you

Public Sub test()
Dim myrange As Range
Set myrange = Worksheets("sheet1").Range(Range("a1"),
Range("a1").End(xlDown))
myrange.AutoFilter Field:=1, Criteria1:="3", Operator:=xlAnd
Set myrange = Worksheets("sheet1").Range(Range("a1"),
Range("a1").End(xlDown))
myrange.Copy Destination:=Range("H6")
End Sub

and then put it under a command button or toolbar button.

problem 2
try this url

http://www.vbusers.com/downloads/download.asp



cribology - ExcelForums.com
wrote in message
...
Hi,

Problem 1)

I would like to create a button than when pressed would copy a large
filtered list to new workbook. Currently copy and paste
special/values results in memory running out as the entire sheet
contains 14,000+ rows. What macro can I use?

Problem 2)
Does anyone know a good online resource with ready made macros? and a
list of all the possible commands that can be used in a macro?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Macro to copy filtered list to new workbook.

1)
Try running this with the filtered sheet active:

Sub Transfer()
Dim Src As Worksheet
Dim wbNew As Workbook
Dim Trg As Worksheet

Set Src = ActiveSheet
Set wbNew = Workbooks.Add(1)
Set Trg = wbNew.Sheets(1)

Src.UsedRange.SpecialCells(xlCellTypeVisible).Copy _
Trg.Range("A1")

End Sub

2)
That list is almost endless. You should narrow your search to what you need.
Let me also recommend that you spend time and money on a book on VBA
programming.

HTH. Best wishes Harald

"cribology - ExcelForums.com"
skrev i melding
...
Hi,

Problem 1)

I would like to create a button than when pressed would copy a large
filtered list to new workbook. Currently copy and paste
special/values results in memory running out as the entire sheet
contains 14,000+ rows. What macro can I use?

Problem 2)
Does anyone know a good online resource with ready made macros? and a
list of all the possible commands that can be used in a macro?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to copy filtered list to new workbook.

THANKS FOR THE FEEDBACK IT WORKS A TREAT NOW

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
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook Ruchir Excel Worksheet Functions 1 July 25th 08 07:29 AM
how do i copy data from the top cell of a filtered list to anothe. Brian Excel Worksheet Functions 1 December 14th 06 11:03 PM
using macro to copy and paste filtered results, what if blank? priceyindevon Excel Worksheet Functions 2 December 14th 06 10:09 AM
Copy on filtered list Vinaya Excel Worksheet Functions 4 November 10th 04 11:56 PM
Need a macro to copy a range in one workbook and paste into another workbook Paul Excel Programming 8 July 1st 04 07:42 AM


All times are GMT +1. The time now is 01:17 AM.

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

About Us

"It's about Microsoft Excel"