#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range issue


I would like my macro to look for the first empty line and use that as
the secdond range value. So for example,

Do while ActiveCell< empty
activecell.offset(1,0).Select
loop
Range("A3:activecell.offset(-1,0)").select


The problem is activecell.offset(-1,0) doesn't appear to be a valid
Range argument.


--
evil baby
------------------------------------------------------------------------
evil baby's Profile: http://www.excelforum.com/member.php...o&userid=31983
View this thread: http://www.excelforum.com/showthread...hreadid=519719

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range issue

It will be a valid argument if you don't use it as a string - text.

Try this:

Range("A3", ActiveCell.Offset(-1, 0)).Select

good luck,
Excel_Fun


evil baby napisal(a):
I would like my macro to look for the first empty line and use that as
the secdond range value. So for example,

Do while ActiveCell< empty
activecell.offset(1,0).Select
loop
Range("A3:activecell.offset(-1,0)").select


The problem is activecell.offset(-1,0) doesn't appear to be a valid
Range argument.


--
evil baby
------------------------------------------------------------------------
evil baby's Profile: http://www.excelforum.com/member.php...o&userid=31983
View this thread: http://www.excelforum.com/showthread...hreadid=519719


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Range issue

Don't bother with it, use this instead

Do While ActiveCell.Offset(1, 0) < Empty
ActiveCell.Offset(1, 0).Select
Loop


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"evil baby" wrote
in message ...

I would like my macro to look for the first empty line and use that as
the secdond range value. So for example,

Do while ActiveCell< empty
activecell.offset(1,0).Select
loop
Range("A3:activecell.offset(-1,0)").select


The problem is activecell.offset(-1,0) doesn't appear to be a valid
Range argument.


--
evil baby
------------------------------------------------------------------------
evil baby's Profile:

http://www.excelforum.com/member.php...o&userid=31983
View this thread: http://www.excelforum.com/showthread...hreadid=519719



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range issue


Thanks for the help, didn't even bother to look at where I had the
quotes.


--
evil baby
------------------------------------------------------------------------
evil baby's Profile: http://www.excelforum.com/member.php...o&userid=31983
View this thread: http://www.excelforum.com/showthread...hreadid=519719

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
I feel so dumb - please help - this is a Range issue Cat Excel Worksheet Functions 4 May 31st 07 11:48 PM
Range issue... James Excel Programming 4 August 4th 05 09:26 PM
Names.Add - Range Syntax Issue Arturo Excel Programming 4 April 22nd 05 04:04 PM
Copy Range Issue SIGE Excel Programming 15 April 5th 05 04:57 PM
Excel Range issue Rohit Nayak Excel Programming 2 November 19th 04 03:10 PM


All times are GMT +1. The time now is 11:49 PM.

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"