Range problem

D

David Goodall

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top