Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Select cells in a column

I need to select all the cells in Column K that have a value. It starts with
K3 and can be any number of cells below, but there are never blank cells
mixed in - its always consecutive. Here is what I have. It works, but seems
"sloppy" for lack of a better word:

ActiveSheet.Range(range("k3"),Cells(ActiveSheet.Ra nge("A65536").End(xlUp).Ro
w, 11)).select

Is there a way to refer to the last used cell in column K without using the
Cells method? Meaning a literal way such as:

Range("k3",ActiveSheet.Range("K65536").End(xlUp).R ow, K) Obviously this
doesn't work, but I was looking for something without using the numeric
index of the column.

thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Select cells in a column

Hi Evan,

Is there a way to refer to the last used cell in column K without using the
Cells method? Meaning a literal way such as:


Simply replace the column number with the correspondinf column letter in
your expressions.

For example, the expressions cells(1,4) and cells(1,"D") are completely
equivalent.


---
Regards,
Norman.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Select cells in a column

Evan wrote:

I need to select all the cells in Column K that have a value. It starts with
K3 and can be any number of cells below, but there are never blank cells
mixed in - its always consecutive. Here is what I have. It works, but seems
"sloppy" for lack of a better word:

ActiveSheet.Range(range("k3"),Cells(ActiveSheet.Ra nge("A65536").End(xlUp).Ro
w, 11)).select

Is there a way to refer to the last used cell in column K without using the
Cells method? Meaning a literal way such as:

Range("k3",ActiveSheet.Range("K65536").End(xlUp).R ow, K) Obviously this
doesn't work, but I was looking for something without using the numeric
index of the column.

thanks


Set rng = Range("K1")
Range(rng(3), rng(rng(65536).End(xlUp).Row)).Select

Alan Beban
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Select cells in a column

Try.....


Range("K3:K"& Cells(Rows.Count, "K").End(xlUp).Row).Select

Cheers
Nigel


"Evan" wrote in message
...
I need to select all the cells in Column K that have a value. It starts

with
K3 and can be any number of cells below, but there are never blank cells
mixed in - its always consecutive. Here is what I have. It works, but

seems
"sloppy" for lack of a better word:


ActiveSheet.Range(range("k3"),Cells(ActiveSheet.Ra nge("A65536").End(xlUp).Ro
w, 11)).select

Is there a way to refer to the last used cell in column K without using

the
Cells method? Meaning a literal way such as:

Range("k3",ActiveSheet.Range("K65536").End(xlUp).R ow, K) Obviously this
doesn't work, but I was looking for something without using the numeric
index of the column.

thanks




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
Copying Select Repeating Cells in a Column Shalebot Excel Worksheet Functions 2 August 10th 09 09:05 PM
How do you select all text/data within all the cells of a column? VisionsIC Excel Discussion (Misc queries) 3 December 20th 08 02:36 AM
How to select certain cells in a column ? Mark246 Excel Discussion (Misc queries) 1 February 25th 08 10:08 PM
How do I select cells within a column that contain a specific word Tobias Excel Worksheet Functions 1 September 28th 07 06:50 PM
Column Width for a select # of cells April New Users to Excel 1 July 7th 05 10:06 PM


All times are GMT +1. The time now is 03:20 PM.

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

About Us

"It's about Microsoft Excel"