Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Select Cells with VBA

Hi:

Can anyone tell me if I can use VBA to select a range of
cells, with the Active Cell being an unknown cell in
column A.

I am using the following:

Sheets("INV").Cells(65536, 1).End(xlUp).Offset(1,
0).Select

to find the last cell and select the cell below. At that
point, I need to select the active cell and several cells
below it in the same row.


Any help appreciated

Thanks,

Sam
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Select Cells with VBA

Use

Selection.Resize(X).Select Where x is the 'Total' number of rows you want the resize to b

----- Sam Fowler wrote: ----

Hi

Can anyone tell me if I can use VBA to select a range of
cells, with the Active Cell being an unknown cell in
column A

I am using the following:

Sheets("INV").Cells(65536, 1).End(xlUp).Offset(1,
0).Selec

to find the last cell and select the cell below. At that
point, I need to select the active cell and several cells
below it in the same row


Any help appreciate

Thanks

Sa

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Select Cells with VBA

You can combine them:

Sheets("INV").Cells(65536, 1).End(xlUp).Offset(1,0).Resize(X).Select

But consider whether you really need to select those X cells to do
whatever comes next.

Alan Beban

chris wrote:
Use:

Selection.Resize(X).Select Where x is the 'Total' number of rows you want the resize to be

----- Sam Fowler wrote: -----

Hi:

Can anyone tell me if I can use VBA to select a range of
cells, with the Active Cell being an unknown cell in
column A.

I am using the following:

Sheets("INV").Cells(65536, 1).End(xlUp).Offset(1,
0).Select

to find the last cell and select the cell below. At that
point, I need to select the active cell and several cells
below it in the same row.


Any help appreciated

Thanks,

Sam

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
Up down arrow keys do not select cells if select locked cells unch roandrob Excel Discussion (Misc queries) 3 May 18th 09 12:48 AM
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
how do you "select locked cells" w/o "select unlocked cells"? princejohnpaulfin Excel Discussion (Misc queries) 3 July 16th 05 03:53 AM
Why aren't my cells highlighted when I select multiple cells? TChristian Setting up and Configuration of Excel 0 January 26th 05 10:23 PM


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

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"