Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default how to select every third row

I need to adjust the width of every third row (empty) in a
large range. Thanks in advance

Jay
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how to select every third row

You can adjust Row ** Height ** or Column ** Width ** Below does Height.

Dim rng as Range
Dim i as long
set rng = Range("LargeRange")
for i = rng.rows(1).row to rng.rows(rng.rows.count).row step 3
cells(i,1).EntireRow.Height = 15
Next

--
Regards,
Tom Ogilvy

Jay wrote in message
...
I need to adjust the width of every third row (empty) in a
large range. Thanks in advance

Jay



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default how to select every third row

If the other rows (not every third) are not empty, you could use F5, Special
Cells, Blanks. to select the empty cells.

--
Regards,

Juan Pablo González

"Jay" wrote in message
...
I need to adjust the width of every third row (empty) in a
large range. Thanks in advance

Jay



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default how to select every third row

Thanks for the response

I meant to say every third column. I figured out a way.

z = 3
For p = 1 To amount
Worksheets("sheet1").Activate
Worksheets("sheet1").Columns(Z).ColumnWidth = 3.59
Z = Z + 3
Next p

Jay
-----Original Message-----
If the other rows (not every third) are not empty, you

could use F5, Special
Cells, Blanks. to select the empty cells.

--
Regards,

Juan Pablo González

"Jay" wrote in

message
...
I need to adjust the width of every third row (empty)

in a
large range. Thanks in advance

Jay



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default how to select every third row

Hi Jay.
A little easier, where your 'amount' is for 30 columns.

For i = 3 To 30 Step 3
Sheet1.Columns(i).ColumnWidth = 3.59
Next

Where Sheet1 is the sheets code name, Sheets(1) is the sheets position, and Sheets("Sheet1") is the sheets name. You may use
either, but the code name is better because it still identifies the correct sheet if you rename it.


Regards Robert

"Jay" wrote in message ...
Thanks for the response

I meant to say every third column. I figured out a way.

z = 3
For p = 1 To amount
Worksheets("sheet1").Activate
Worksheets("sheet1").Columns(Z).ColumnWidth = 3.59
Z = Z + 3
Next p

Jay
-----Original Message-----
If the other rows (not every third) are not empty, you

could use F5, Special
Cells, Blanks. to select the empty cells.

--
Regards,

Juan Pablo González

"Jay" wrote in

message
...
I need to adjust the width of every third row (empty)

in a
large range. Thanks in advance

Jay



.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.590 / Virus Database: 373 - Release Date: 17/02/2004


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
VBA: Column Select then Data Select then return to cell A1 James C[_2_] Excel Discussion (Misc queries) 3 February 1st 10 11:35 AM
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
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 5th 05 12:03 AM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 4th 05 11:59 PM
Select other workbook to select data in a macro. T Tromp Excel Programming 2 September 19th 03 01:43 PM


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