#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default Adding rows

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Adding rows

As ALWAYS, post your code for comments
activecell.resize(12).select

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Squeaky" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Adding rows

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Adding rows

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" wrote in message
...
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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default Adding rows

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
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
Adding rows based on no of rows specified from a given position nanette Excel Worksheet Functions 1 July 9th 08 02:29 PM
adding some rows in the middle of adding some other rows Janis Excel Programming 3 October 4th 07 03:20 AM
Adding five new rows every 40 rows in a spreadsheet? Olzki Excel Discussion (Misc queries) 8 May 18th 07 02:14 AM
Adding Rows offsets to working rows across two worksheets tom Setting up and Configuration of Excel 3 July 30th 06 07:54 PM
Adding new rows Paul Sheppard Excel Discussion (Misc queries) 2 July 28th 05 06:05 AM


All times are GMT +1. The time now is 07:55 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"