PC Review


Reply
 
 
Squeaky
Guest
Posts: n/a
 
      17th Jul 2009
This should be easy but is giving me grief.
I need code that, after selecting a random cell in column A ( I have the
code to do that part) will then select the next 12 entire rows underneath it.

Squeaky
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      17th Jul 2009
As ALWAYS, post your code for comments
activecell.resize(12).select

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Squeaky" <(E-Mail Removed)> wrote in message
news:E724E974-EA1F-40CC-9A60-(E-Mail Removed)...
> This should be easy but is giving me grief.
> I need code that, after selecting a random cell in column A ( I have the
> code to do that part) will then select the next 12 entire rows underneath
> it.
>
> Squeaky


 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      18th Jul 2009
If you mean *** entire *** row...from the active cell; try the below

Rows(activecell.row & ":" & activecell.row+12).select

If this post helps click Yes
---------------
Jacob Skaria


"Squeaky" wrote:

> This should be easy but is giving me grief.
> I need code that, after selecting a random cell in column A ( I have the
> code to do that part) will then select the next 12 entire rows underneath it.
>
> Squeaky

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      18th Jul 2009
The wording of your request is not entirely clear to me. When you say "then
select 12 entire rows **underneath** it"... to you mean the 12 row below the
active cell? If so...

ActiveCell.EntireRow.Resize(12).Offset(1).Select

If, on the other hand, you are requesting 12 entire rows *starting with* the
active cell, then do this instead...

ActiveCell.EntireRow.Resize(12).Select

--
Rick (MVP - Excel)


"Squeaky" <(E-Mail Removed)> wrote in message
news:E724E974-EA1F-40CC-9A60-(E-Mail Removed)...
> This should be easy but is giving me grief.
> I need code that, after selecting a random cell in column A ( I have the
> code to do that part) will then select the next 12 entire rows underneath
> it.
>
> Squeaky


 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      18th Jul 2009

Sub selectrng()
ActiveCell.Resize(12).EntireRow.Select
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Don Guillett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> As ALWAYS, post your code for comments
> activecell.resize(12).select
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "Squeaky" <(E-Mail Removed)> wrote in message
> news:E724E974-EA1F-40CC-9A60-(E-Mail Removed)...
>> This should be easy but is giving me grief.
>> I need code that, after selecting a random cell in column A ( I have the
>> code to do that part) will then select the next 12 entire rows underneath
>> it.
>>
>> Squeaky

>


 
Reply With Quote
 
Squeaky
Guest
Posts: n/a
 
      21st Jul 2009
Thanks for all of the suggestions.

The one from Rick did the trick.

Squeaky

"Squeaky" wrote:

> This should be easy but is giving me grief.
> I need code that, after selecting a random cell in column A ( I have the
> code to do that part) will then select the next 12 entire rows underneath it.
>
> Squeaky

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding my own rows to a Union Query without adding another table? PaulSchrum Microsoft Access Queries 3 15th Feb 2011 08:28 PM
adding some rows in the middle of adding some other rows =?Utf-8?B?SmFuaXM=?= Microsoft Excel Programming 3 4th Oct 2007 03:20 AM
Adding rows to a data table: Rows do not show up =?Utf-8?B?dnZlbms=?= Microsoft VB .NET 2 10th Oct 2006 12:07 AM
Adding Rows offsets to working rows across two worksheets =?Utf-8?B?VG9t?= Microsoft Excel Setup 3 30th Jul 2006 07:54 PM
How to prevent drawing DataGrid rows while adding rows? =?Utf-8?B?VFQgKFRvbSBUZW1wZWxhZXJlKQ==?= Microsoft C# .NET 2 6th Apr 2005 04:51 PM


Features
 

Advertising
 

Newsgroups
 


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