Thread: Command help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Command help

assume you have data in column A. go to the end of column A (A65536) and
hit the End Key, then the Up Arrow. this is the same ans

set rng = Cells(rows.count,1).End(xlup)
rng.select

So you can use it to find the last filled cell in a column. Likewise, go to
A1 and hit the end key, then the down arrow. The focus changes to the next
cell that is filled (if there are intermediate blank cells), or the last
filled cell in a contiguous range of cells in that column.

Similar behavior to for xlright and xlLeft.

Use them when you need that information.

--
Regards,
Tom Ogilvy

"Syed Haider Ali"
<Syed.Haider.Ali.1tg86j_1123509981.0395@excelfor um-nospam.com wrote in
message news:Syed.Haider.Ali.1tg86j_1123509981.0395@excelf orum-nospam.com...

Dear Freinds,

can anybody explain the commands ".end(xlup), .end(xldown),
end(xlright), .end(xlleft)". And where we use these commands.

SYED HAIDER ALI


--
Syed Haider Ali
------------------------------------------------------------------------
Syed Haider Ali's Profile:

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