LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default offset?

Use a combination of offset and resize.

dim rng1 as range
dim rng2 as range
set rng1 = whateverrangeyouwant

with rng1
set rng2 = .resize(.rows.count-1).offset(1,0)
end with

one fewer row in rng2 than in rng1 (and the number of columns weren't specified,
so they didn't change) and then down one row.

ward376 wrote:

So it is caused by the offset. How can I avoid this? I need to leave
the header alone.


--

Dave Peterson


 
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
OFFSET Jose Mourinho Excel Worksheet Functions 1 December 23rd 09 01:26 PM
Offset Q Seanie Excel Worksheet Functions 6 January 16th 09 03:11 AM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Offset Brian Excel Worksheet Functions 6 April 7th 06 12:33 PM
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) [email protected] Excel Programming 2 August 22nd 05 05:25 AM


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