Finding next blank cell

R

rob nobel

Hi all,
I use this code to find the last non blank cell.
ActiveSheet.Range("G65336").End(xlUp).Select
How would I modify this to select the next blank cell after that cell?
Rob
 
T

Trevor Shuttleworth

Rob

ActiveSheet.Range("G65336").End(xlUp).Offset(1,0).Select

Regards

Trevor
 
R

rob nobel

Cor trevor, what time do you go to bed??
But thanks HEAPS!!
One day I'll understand more what the Offset does so I can use it more
often.
Rob
 
T

Trevor Shuttleworth

Well, you know, when you get to a certain age, you get to go to bed a bit
later ... and I'm way past that age. Guess there might be a bit of a time
difference too ... it's just gone 11:00 p.m. here in the UK.

Glad I could help though.

Regards

Trevor
 
R

rob nobel

Now from that I guess you must be a teenager as any one over that age would
realise sleep is far too important to minimise the black look around the
eyes and the nagging 'hangover' feel of being up too late.
Just kidding though!
ob
 
R

rob nobel

Now that's a confusing one Alan.
is the (2,1) related to Offset?
Can you explain what 2 and 1 actually do and can it be used in any other
application?
Rob
 
A

Alan Beban

It's simply basic range indexing with the Item Property; 2 is the row
number, 1 is the column number. It can be used almost always in lieu of
the Cells Property, and very often in lieu of the Offset Property,
although the Offset Property is 0-based and the Item Property is 1-based.

See http://www.cpearson.com/excel/cells.htm

Alan Beban
 
R

rob nobel

Thanks for the extra info Alan.
I couldn't figure how your suggestion worked as the row number didn't make
sense. But now it does. Vis: ("although the Offset Property is 0-based and
the Item Property is 1-based.")
Thanks,
rob
 
A

Alan Beban

De nada.

Alan Beban

rob said:
Thanks for the extra info Alan.
I couldn't figure how your suggestion worked as the row number didn't make
sense. But now it does. Vis: ("although the Offset Property is 0-based and
the Item Property is 1-based.")
Thanks,
rob
 
Top