Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Removing 1st four rows from a range

Could someone please tell me if there is an elegant way include all of
collums G-L minus the first 4 rows in a range.

I can select all of columns G-L with something like:

Dim priCol as Range
Set priCol = ActiveSheet().Range("G1:L1").EntireColumn

Then I would like to be able to remove just the first 4 rows from this
range.

I can kludge it by using the the 'usedRange.address' properties like this:

dim secCol as Range
Set rusedRange = ActiveSheet().UsedRange
sAddress = rusedRange.Address
pos = InStr(1, sAddress, ":", vbTextCompare)
sAddress = Mid(sAddress, pos, Len(sAddress))

Set secCol = ActiveSheet().Range("G4" & sAddress)
secCol.Select

However I feel that this way is inelegant, and that there is probably a
better way. Could someone please point me to this better way.

-Many Thanks!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
mcg mcg is offline
external usenet poster
 
Posts: 18
Default Removing 1st four rows from a range

Range("g5", Range("l5").End(xlDown)).Select

mcg

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
Removing duplicate rows Roger Bell New Users to Excel 2 January 4th 08 01:25 PM
Removing duplicate rows Jase4now Excel Discussion (Misc queries) 3 October 24th 07 09:42 PM
Removing unwanted rows sroe9738 Excel Worksheet Functions 0 February 1st 06 10:26 PM
Removing Empty Rows and selecting Specific Rows Jetheat[_8_] Excel Programming 7 August 12th 05 12:10 AM
Removing Duplicate Rows bvinternet Excel Discussion (Misc queries) 1 July 23rd 05 09:26 PM


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