Select.End()


Posted by Poodas on January 15, 2002 8:18 PM

I desparately need a definition and example of the Select.End function used in old Excel 4.0 sheet macros.

The problem relates to a sheet with a set of values. This function is supposed to find the next empty cell in a particular row. I ned to know how it is used for this purpose.

Can anybody help?



Posted by Jacob on January 15, 2002 8:27 PM

Hi

This is what you want

range("A65536").end(xlup).select
range("A1").end(xldown).select
range("IV1").end(xltoleft).select
range("A1").end(xltoright).select

Modify as needed

Also these will select the last cell with a value if you want the first empty cell after this then add offset(row,col) i.e. range("A65536").end(xlup).offset(1,0).select would select the first empty row in col A

HTH

Jacob