ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Command help (https://www.excelbanter.com/excel-programming/336679-command-help.html)

Syed Haider Ali[_8_]

Command help
 

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


Tom Ogilvy

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




Jean-Yves[_2_]

Command help
 
Hi Ali,

Suppose you have a xl table : Use the key c"Ctrl" + arrow key - to get to
the last non blank cell in that row.
This way you can navigate quickly to the edges of a range by using the
keyboard (double-clicking on the cell border
will also have the same effect).
To find the last cell in a table trought vba, you can use
range("A1").end(xldown) to get to the last cell in column A.
Regards
Jean-Yves

"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





All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com