Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to know the address of the last cell

Hello,

_Example_

RANGE(\"A1:H44\").SORT KEY1:=RANGE(\"B2\"), ORDER1:=XLASCENDING,
HEADER:= _
XLGUESS, ORDERCUSTOM:=1, MATCHCASE:=FALSE,
ORIENTATION:=XLTOPTOBOTTOM, _
DATAOPTION1:=XLSORTNORMAL


My problem ; the last cell of this selection (H44) is increasing every
day (H45, H46 ...).

How can I calculate automatically the last cell ?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to know the address of the last cell

Hello

Please use the method .End(xlDown) of Range Object



"ChefChaudart" wrote in message
...
Hello,

_Example_

RANGE(\"A1:H44\").SORT KEY1:=RANGE(\"B2\"), ORDER1:=XLASCENDING,
HEADER:= _
XLGUESS, ORDERCUSTOM:=1, MATCHCASE:=FALSE,
ORIENTATION:=XLTOPTOBOTTOM, _
DATAOPTION1:=XLSORTNORMAL


My problem ; the last cell of this selection (H44) is increasing every
day (H45, H46 ...).

How can I calculate automatically the last cell ?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default How to know the address of the last cell

It is considered impolite to type all CAPS. Called "shouting"
You could use
x=cells(65536,"h").end(xlup).row
range("a1:h" & x)

or better yet you could create a defined name for the range that
automatically increases with each addition or subtraction.
insertnamedefinetype in a name like colHin the refers to box type
=offset($H$1,0,0,counta($h:$h),1)

"ChefChaudart" wrote in message
...
Hello,

_Example_

RANGE(\"A1:H44\").SORT KEY1:=RANGE(\"B2\"), ORDER1:=XLASCENDING,
HEADER:= _
XLGUESS, ORDERCUSTOM:=1, MATCHCASE:=FALSE,
ORIENTATION:=XLTOPTOBOTTOM, _
DATAOPTION1:=XLSORTNORMAL


My problem ; the last cell of this selection (H44) is increasing every
day (H45, H46 ...).

How can I calculate automatically the last cell ?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to know the address of the last cell

Use Range("A1").Sort

Excel should pick up the appropriate range. You don't need notation like
\"

--
Regards,
Tom Ogilvy

"ChefChaudart" wrote in message
...
Hello,

_Example_

RANGE(\"A1:H44\").SORT KEY1:=RANGE(\"B2\"), ORDER1:=XLASCENDING,
HEADER:= _
XLGUESS, ORDERCUSTOM:=1, MATCHCASE:=FALSE,
ORIENTATION:=XLTOPTOBOTTOM, _
DATAOPTION1:=XLSORTNORMAL


My problem ; the last cell of this selection (H44) is increasing every
day (H45, H46 ...).

How can I calculate automatically the last cell ?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
=HYPERLINK("#"&CELL("address", ADDRESS(MATCH(VALUE(B3),QuoteNotes, sarah Excel Worksheet Functions 2 February 17th 09 02:59 PM
=HYPERLINK("#"&CELL("address", ADDRESS(MATCH(VALUE(B3),Range ... ? sarah Excel Worksheet Functions 0 February 17th 09 02:06 PM
Return cell address of a cell based on contents of cell. Danny Excel Worksheet Functions 4 November 15th 08 03:11 AM
find last cell in range with data, display cell address sevi61 Excel Worksheet Functions 14 October 29th 07 08:36 PM
How to create table of cell names with the name's cell address WildwoodEngr Excel Discussion (Misc queries) 1 October 26th 06 02:52 PM


All times are GMT +1. The time now is 10:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"