Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default selecting a range of cells

I am working in VBA and am still trying to select ranges.

This statement works to select all the rows that are used
in columns A to C
Set rng = Range("A1:C" & Cells(Rows.Count, "C").End
(xlUp).Row)
rng.Select

I am trying to select all the rows from 3 on down in
columns N and O. This does not work as it only gets
through row 32. What am I missing?

Set rng = Range("N3:O3" & Cells(Rows.Count, "O").End
(xlUp).Row)
rng.Select

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default selecting a range of cells

Barb,

Try changing:

Set rng = Range("N3:O3" & Cells(Rows.Count, "O").End(xlUp).Row)

to

Set rng = Range("N3:O" & Cells(Rows.Count, "O").End(xlUp).Row)

Gary

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
Selecting a range of cells, how to ? Luc Excel Worksheet Functions 2 February 23rd 07 07:17 PM
Range selecting cells Alec H Excel Discussion (Misc queries) 2 March 14th 06 01:36 PM
Selecting a Range Of Cells. Neil Excel Programming 1 February 24th 05 11:54 AM
Help with selecting a range of cells Mick[_3_] Excel Programming 0 January 12th 05 09:41 AM
Selecting a range of cells Kevin Excel Programming 5 October 10th 03 03:03 PM


All times are GMT +1. The time now is 10:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"