ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to select every third row (https://www.excelbanter.com/excel-programming/290959-how-select-every-third-row.html)

Jay[_14_]

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

Tom Ogilvy

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




Juan Pablo González

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




Jay[_14_]

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



.


Robert McCurdy

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




All times are GMT +1. The time now is 01:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com