ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   MARK EVERY FOURTH ROW (https://www.excelbanter.com/excel-worksheet-functions/29162-mark-every-fourth-row.html)

lehigh46

MARK EVERY FOURTH ROW
 

HI ALL,

In column A, I have consecutive numbers 1 thru 7,000

In column B, I would like to write a formula and copy it down to show
a number 1 on every fourth line .

How can I accomplish this?


Thanks for your help.

Tom Snyder


x-- 100 Proof News - http://www.100ProofNews.com
x-- 3,500+ Binary NewsGroups, and over 100,000 other groups
x-- Access to over 1.6 Terabytes per Day - $8.95/Month
x-- UNLIMITED DOWNLOAD


N Harkawat

Assumng the range is between A1:A7000
on cell B1 type the following and copy it all the way down
=if(mod(row(),4)=0,"",1)

This will copy the number 1 on ever 4th row in column B

"lehigh46" wrote in message
...

HI ALL,

In column A, I have consecutive numbers 1 thru 7,000

In column B, I would like to write a formula and copy it down to show
a number 1 on every fourth line .

How can I accomplish this?


Thanks for your help.

Tom Snyder


x-- 100 Proof News - http://www.100ProofNews.com
x-- 3,500+ Binary NewsGroups, and over 100,000 other groups
x-- Access to over 1.6 Terabytes per Day - $8.95/Month
x-- UNLIMITED DOWNLOAD




Domenic

Try the following...

For every fourth line, starting with the first cell...

B1, copied down:

=IF(MOD(ROW()-ROW($B$1)+0,4)=0,1,"")

For every fourth line, starting with the first occurrence of 'fourth'...

B1, copied down:

=IF(MOD(ROW()-ROW($B$1)+1,4)=0,1,"")

Hope this helps!

In article ,
lehigh46 wrote:

HI ALL,

In column A, I have consecutive numbers 1 thru 7,000

In column B, I would like to write a formula and copy it down to show
a number 1 on every fourth line .

How can I accomplish this?


Thanks for your help.

Tom Snyder


x-- 100 Proof News - http://www.100ProofNews.com
x-- 3,500+ Binary NewsGroups, and over 100,000 other groups
x-- Access to over 1.6 Terabytes per Day - $8.95/Month
x-- UNLIMITED DOWNLOAD


Don Guillett

try this
Sub every4throw()
For i = 1 To Cells(Rows.Count, "a").End(xlUp).Row Step 4
Cells(i, "b").Offset(0, 1) = 1
Next i
End Sub

--
Don Guillett
SalesAid Software

"lehigh46" wrote in message
...

HI ALL,

In column A, I have consecutive numbers 1 thru 7,000

In column B, I would like to write a formula and copy it down to show
a number 1 on every fourth line .

How can I accomplish this?


Thanks for your help.

Tom Snyder


x-- 100 Proof News -
http://www.100ProofNews.com
x-- 3,500+ Binary NewsGroups, and over 100,000 other groups
x-- Access to over 1.6 Terabytes per Day - $8.95/Month
x-- UNLIMITED DOWNLOAD





All times are GMT +1. The time now is 03:07 PM.

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