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: 6
Default Variable Range

On my worksheet, I have values in columns A-H. The following code has worked
up to now, but I have just realised that if values in any other column
exceed Column A, they are likely to be deleted (which I don't want).

Set DelRangea = [a1].End(xlDown).Offset(1, 0)
Set DelRangeb = DelRangea.End(xlDown).Offset(-1, 0)

Range(DelRangea, DelRangeb).EntireRow.Delete

In a situation where I have, say, values in cells A1:A8; B1:B8; C1:C8;
D1:D14; E1:E14; F1:F14; G1:G12; H1:H12, can DelRangea be extended so as to
include Columns B to H so that the rows to be deleted are just the blank
rows, leaving one blank (i.e., Row 15 for above example) as a divider?

Thank you for any help
Martin


 
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
Variable Range James C. Excel Discussion (Misc queries) 3 April 2nd 09 12:41 AM
variable range John New Users to Excel 2 July 21st 06 03:42 PM
Variable range in VB famdamly Excel Discussion (Misc queries) 2 January 22nd 06 02:29 PM
variable range JEFF Excel Programming 5 November 21st 03 12:17 PM
Problem trying to us a range variable as an array variable TBA[_2_] Excel Programming 4 September 27th 03 02:56 PM


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