Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Select the last Cell of a selected Cellarea

Hallo,

if there are the following value in a column
23
21
32
Sum

and I select with the mouse the area with first three rows (only the
numerical values). Which command can I use to determine the rangeadress in a
macro?

The Command determine the whole range, including the string in the last
line. This is not that I need.
..Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row)

Thanks,
Ben
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Select the last Cell of a selected Cellarea

..Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row-1)


--
Regards,
Tom Ogilvy


"Ben" wrote in message
...
Hallo,

if there are the following value in a column
23
21
32
Sum

and I select with the mouse the area with first three rows (only the
numerical values). Which command can I use to determine the rangeadress in

a
macro?

The Command determine the whole range, including the string in the last
line. This is not that I need.
.Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row)

Thanks,
Ben



  #3   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Select the last Cell of a selected Cellarea

This is not, that I need. Thats why I don't know if where one, two or five
.... lines at the buttom of the numerical values. The user marked the
numerical values and I need to know the range, that is marked. With the
command

..Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row)

I get all cells to the next empty cell in the column but not only the
user-marked.

Thanks,
Ben

"Tom Ogilvy" schrieb:

..Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row-1)


--
Regards,
Tom Ogilvy


"Ben" wrote in message
...
Hallo,

if there are the following value in a column
23
21
32
Sum

and I select with the mouse the area with first three rows (only the
numerical values). Which command can I use to determine the rangeadress in

a
macro?

The Command determine the whole range, including the string in the last
line. This is not that I need.
.Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row)

Thanks,
Ben




  #4   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Select the last Cell of a selected Cellarea

Activewindow.RangeSelection

Sorry. Thats it,
Ben

"Ben" schrieb:

This is not, that I need. Thats why I don't know if where one, two or five
... lines at the buttom of the numerical values. The user marked the
numerical values and I need to know the range, that is marked. With the
command

.Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row)

I get all cells to the next empty cell in the column but not only the
user-marked.

Thanks,
Ben

"Tom Ogilvy" schrieb:

..Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row-1)


--
Regards,
Tom Ogilvy


"Ben" wrote in message
...
Hallo,

if there are the following value in a column
23
21
32
Sum

and I select with the mouse the area with first three rows (only the
numerical values). Which command can I use to determine the rangeadress in

a
macro?

The Command determine the whole range, including the string in the last
line. This is not that I need.
.Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row)

Thanks,
Ben




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Select the last Cell of a selected Cellarea

Or just selection in the scenario you describe.



--
Regards,
Tom Ogilvy


"Ben" wrote in message
...
Activewindow.RangeSelection

Sorry. Thats it,
Ben

"Ben" schrieb:

This is not, that I need. Thats why I don't know if where one, two or

five
... lines at the buttom of the numerical values. The user marked the
numerical values and I need to know the range, that is marked. With the
command

.Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row)

I get all cells to the next empty cell in the column but not only the
user-marked.

Thanks,
Ben

"Tom Ogilvy" schrieb:

..Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row-1)


--
Regards,
Tom Ogilvy


"Ben" wrote in message
...
Hallo,

if there are the following value in a column
23
21
32
Sum

and I select with the mouse the area with first three rows (only the
numerical values). Which command can I use to determine the

rangeadress in
a
macro?

The Command determine the whole range, including the string in the

last
line. This is not that I need.
.Range(ActiveCell.Address(0, 0) & ":a" & .Cells(Rows.Count,
"A").End(xlUp).Row)

Thanks,
Ben







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
when I select one cell, why are 5 more cells selected below Mrnetwurm Excel Discussion (Misc queries) 3 August 19th 09 11:15 PM
List to select up to 6 selected responses Ellen Excel Discussion (Misc queries) 4 May 12th 07 05:20 PM
if i select a cell then i want row containing that cell selected Maaz New Users to Excel 1 February 22nd 07 02:12 PM
Can you select a chart but not see it's selected? Mark Stephens Charts and Charting in Excel 1 May 8th 05 08:17 AM
How do I de-select a selected row? Suze Excel Discussion (Misc queries) 1 April 25th 05 05:10 PM


All times are GMT +1. The time now is 04:29 AM.

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"