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

If row 3 is empty

for each r in Worksheets("Sheet1").Range("D4").CurrentRegion



Next

if it does

Dim rng1 as Range, r as Range
With Worksheets("sheet1")
set rng1 = .Range(.Range("D4").end(xltoright),.Range("D4").en d(xldown))
End With
for each r in rng1

Next

--
Regards,
Tom Ogilvy


"EAB" wrote in message
...
I noticed someone was trying to select a range in the
newsgroup postings and I thought that I could use this as
well. When using the code below, the error occurs:

MyRange = Range(Selection, Selection.End
(xlToRight)).Select & Range(Selection, Selection.End
(xlDown)).Select

For Each R In Worksheets("Sheet1").Range(MyRange).Cells

I want to select a range based off of D4 but I don't want
o have to manually input the last cell. Any ideas?



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 Garth Excel Discussion (Misc queries) 2 March 4th 09 08:40 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Selecting a Range SJT Excel Discussion (Misc queries) 2 March 8th 06 07:30 PM
Help with selecting a range... Don Guillett[_4_] Excel Programming 0 July 22nd 03 03:18 PM
selecting a range David Excel Programming 2 July 21st 03 11:14 PM


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