LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Range problem

Morning
I'm using the following code to find the last empty column and then the last
empty row. I then want to use add information to the next column but only
within the range I've found.

Here is what I have so far:
ActiveSheet.Range("A1").End(xlToRight).Select 'finds first blank column
rng1 = ActiveCell.AddressLocal(RowAbsolute:=False)
rng1 = RemoveChar(rng1) 'function that removes the $
rng2 = Range((rng1),
Range(rng1).End(xlDown)).AddressLocal(RowAbsolute: =False)
rng2 = RemoveChar(rng2) 'function that removes the $
'rng2 is now the string O1:O50

Range(rng2).Select

I now want to apply my range to a range variable Rng.

Rng = range(rng2) - this doesn't work however. Once I've done this I will
use the offset function to add my information.

Any help is greatly appreciated. Could I improve the code above?



 
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
3D range problem br549 Excel Worksheet Functions 1 June 15th 07 08:52 PM
Range Problem jesmin Excel Discussion (Misc queries) 19 December 19th 05 12:11 AM
getting value of range problem Grant Excel Programming 1 September 23rd 04 06:20 AM
range problem [email protected] Excel Programming 1 April 9th 04 09:47 AM
Range problem Reno Excel Programming 7 September 19th 03 07:24 PM


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