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: 177
Default If filter results in blank cells, skip to next part of program

I have a macro that runs a filter, copies the results, and pastes it into
another worksheet.

How do I skip to next part of code if the filter results are blank? For
some reason, Excel 2007 crashes when it tries to copy and paste blank filter
results.


This is part of the code that I have now:

Sheets("Screens").Select
Range("B9:FA9").Select
Selection.Copy

Sheets("List").Select
Range("AI6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Application.Run "ShowAll"
Application.Run "Run_All_Filters"

Range("D13").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Selector").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

How do I modify this so if D13 is blank and there is nothing to select, it
will skip on to the next part of the code?

Thanks...


 
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
Number Cells skip blank cells, Excel 2000 & 2003 jfcby[_2_] Excel Programming 4 July 31st 07 03:02 PM
How to skip the blank cells for calculating StdDev? Eric Excel Worksheet Functions 3 November 6th 06 07:38 AM
Skip blank cells in diagrams hlp Charts and Charting in Excel 9 February 24th 06 02:32 PM
How do I skip blank cells when copying over a range of cells? tawells Excel Discussion (Misc queries) 2 June 7th 05 09:36 PM
how to skip the blank cells nayeemoddin Excel Discussion (Misc queries) 1 December 6th 04 07:07 AM


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