LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Resizing my range - End row

Try

Set myRng = .Range("c20", .Cells(.Rows.Count, "c").End(xlUp).row - 1)

HTH

"Jacqui" wrote:

I have used the following syntax to determine the range for a For Each
statement. However I'd like the end row to be 1 less than is returned so I
enclosed a -1 in the bracket. I'm now getting a mismatch error from VBA.
How do I fix?

Many thanks
Jacqui

Set myRng = .Range("c20", .Cells(.Rows.Count, "c").End(xlUp) - 1)

 
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
resizing a range of cells ckane Excel Discussion (Misc queries) 4 May 3rd 07 06:08 PM
Resizing a range of cells in a column ckane Excel Discussion (Misc queries) 0 May 3rd 07 02:38 PM
Resizing cells in a selection without resizing entire sheet Danielle via OfficeKB.com Excel Discussion (Misc queries) 4 August 11th 06 10:06 PM
resizing a range Tim Kredlo Excel Programming 1 September 27th 05 08:30 PM
Resizing a Range NetWave128[_3_] Excel Programming 3 April 24th 04 11:16 AM


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