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 or scripting help

I have a spreadsheet that goes to column P. All cells have data except for
Column M. Half of column M contains data and the rest are empty cells. I
need to copy or move all data rows associated with the cells in column M
that contains data. Normally I would be able to do this by just recording
macros, but data is constantly being added.

Hope I explained this correctly. Any advice is greatly appreciated.
Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Macro or scripting help

The below suggestion uses autofilter to only show those rows where
column(M) is nonblank, then copy all
of the visible rows to your destination. You didn't specify,so I
showed how to page it on sheet2 starting at cell A1.

sub filtercopy()
Cells.AutoFilter Field:=13, Criteria1:="<"
Cells.SpecialCells(xlCellTypeVisible).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
Application.CutCopyMode = False
Selection.AutoFilter
end sub


Good luck, have fun, and let me know if/how I can be of further
assistance.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro or scripting help

thanks!! that did the trick..

"Jef Gorbach" wrote in message
...
The below suggestion uses autofilter to only show those rows where
column(M) is nonblank, then copy all
of the visible rows to your destination. You didn't specify,so I
showed how to page it on sheet2 starting at cell A1.

sub filtercopy()
Cells.AutoFilter Field:=13, Criteria1:="<"
Cells.SpecialCells(xlCellTypeVisible).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
Application.CutCopyMode = False
Selection.AutoFilter
end sub


Good luck, have fun, and let me know if/how I can be of further
assistance.


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
security constraints when you a excel scripting macro? douglas Excel Programming 2 April 4th 09 11:10 PM
VBA scripting Pete Excel Discussion (Misc queries) 2 January 9th 09 03:36 AM
Is scripting the way to go here? LKG[_2_] Excel Programming 0 September 9th 05 07:22 PM
VB Scripting/Macro - Filling/Editing Worksheet References Meghan New Users to Excel 2 December 16th 04 05:55 PM
5.6 Scripting Jerry[_11_] Excel Programming 0 July 15th 03 11:55 PM


All times are GMT +1. The time now is 03:06 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"