LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Advanced Filter Copy Paste Blank Line Hell :(

Here is a problem that is driving me nuts..

A workbook imports data into Sheet1, and this data is analysed using an advanced filter with criteria that are inserted above the data (once imported, blank lines are inserted and a number of criteria sets are pasted as headers into rows 1-7, with the advanced filter called after ie

In this example, header rows and criteria are pasted in rows 1-7, but there is only criteria in A2-K4 (hence the values)

Range("A7:K50000").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange
:=Range("A2:K4"), Unique:=Fals
Selection.SpecialCells(xlCellTypeVisible).Selec
Selection.Cop

Then, in another empty sheet, result is pasted..
Range("A1").Selec
ActiveSheet.Past

Except that the new page is filled with hundreds of empty lines after the data..
Using blank row (based on empty column "A") doesn't help...ie

Selection.SpecialCells(xlCellTypeBlanks).Selec
Selection.Clea
Range("A1:A65535").SpecialCells(xlCellTypeBlanks). EntireRow.Delet

Also, the data seems to occupy too many columns aswell (although i'm sure this is explained by the fact that the imported data uses columns A - R, but the data is stripped down to A - K
Hunches are a solution has something to do with pdating active range (although this is Excel XP not 97), and maybe something to do with the "CellTypeVisible" including all blank rows - maybe an alternative operand?
Any help would be greatly appreciated - the processed workbook is 20x bigger !!

Thanks in advance

Mike
 
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 - Copy/Paste Special to Next Blank Line lajohn63 New Users to Excel 2 August 27th 12 09:27 PM
Find blank with Advanced Filter CJ Excel Discussion (Misc queries) 2 December 16th 08 10:46 PM
advanced filter looking for blank cells pete the greek Excel Discussion (Misc queries) 1 April 20th 07 02:05 PM
Use Advanced Filter to Detect non blank rows Connie Excel Discussion (Misc queries) 0 October 19th 06 09:40 PM
How do I use advanced filter to filter for blank cells? Monique Excel Discussion (Misc queries) 2 March 21st 06 06:43 PM


All times are GMT +1. The time now is 10:06 PM.

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"