Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Grouping Rows

I need to group a bunch of rows but I am having some problems. The code
lines below works great:
Rows("5:8").Select
Selection.Rows.Group
but I need to group these rows 12,14,16,18,20,22,24,26,28,30. I tried
Rows("12,14,16,18,20,22,24,26,28,30").Select
Selection.Rows.Group
but I get and Overflow error message. When I tried
Me.Rows("12:12,14:14,16:16,18:18,20:20,22:22,24:24 ,26:26,28:28,30:30").Select
Selection.Rows.Group
I get a Type mismatch error message.

What am I doing wrong?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Grouping Rows

HI

The 'Rows' object obviously do not accept non-coherent rows, but the Range
object does, so the code below will work:

Range("A12,A14,A16,A18,A20,A22,A24,A26,A28,A30").E ntireRow.Select

Regards,
Per

"Ayo" skrev i meddelelsen
...
I need to group a bunch of rows but I am having some problems. The code
lines below works great:
Rows("5:8").Select
Selection.Rows.Group
but I need to group these rows 12,14,16,18,20,22,24,26,28,30. I tried
Rows("12,14,16,18,20,22,24,26,28,30").Select
Selection.Rows.Group
but I get and Overflow error message. When I tried
Me.Rows("12:12,14:14,16:16,18:18,20:20,22:22,24:24 ,26:26,28:28,30:30").Select
Selection.Rows.Group
I get a Type mismatch error message.

What am I doing wrong?


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
Grouping Rows Seftyby Excel Worksheet Functions 1 October 3rd 08 02:18 PM
grouping rows bduncan Excel Programming 3 July 29th 08 05:37 PM
grouping rows... kang New Users to Excel 5 June 10th 07 05:44 PM
Grouping Rows Moz Excel Discussion (Misc queries) 0 July 21st 06 05:33 AM
Grouping rows together Steve-o Excel Worksheet Functions 1 March 23rd 06 06:56 PM


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