ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula on nth row (https://www.excelbanter.com/excel-worksheet-functions/28976-formula-nth-row.html)

Paul

Formula on nth row
 
My worksheet has blocks of 6 rows for each item I'm reporting on. I want to
apply a formula to the last row in each section, using data from the previous
column and the other cells in the same column, i.e

b6 = sum(a6-b1-b2-b3-b4+b5)
c6 = sum(b6-c1-c2-c3-c4+c5) etc.

I think I can get to each 6th row, by

if(mod(row(a1:a240) - 1),6) = 0, but not sure how to apply the formula

Thanks for any suggestions

arno

Hi Paul,

My worksheet has blocks of 6 rows for each item I'm reporting on.


I am not sure what you are doing.

Pls. try to enter 6 formulas for a block (even if you do it manually,
without copying) and then copy all 6 formulas and paste them down your
list. The range for the paste operation must be a multiple of 6 (arrgh,
bad english, = 6, 12, 18...60... rows, ok?).

arno


Duke Carey

Paul -

Insert a new column or use an empty column and enter this formula

=mod(row(),6)=0
or, if you have a header row make it
=mod(row()-1,6)=0
This will return TRUE for every 6th row, FALSE otherwise
Filter on the TRUE values
Enter your formula(s) in the first filtered row
Copy the formulas
Select the entire range
Press the F5 key, click on Special, and select Visible Cells Only
Paste
Undo your filter



"Paul" wrote:

My worksheet has blocks of 6 rows for each item I'm reporting on. I want to
apply a formula to the last row in each section, using data from the previous
column and the other cells in the same column, i.e

b6 = sum(a6-b1-b2-b3-b4+b5)
c6 = sum(b6-c1-c2-c3-c4+c5) etc.

I think I can get to each 6th row, by

if(mod(row(a1:a240) - 1),6) = 0, but not sure how to apply the formula

Thanks for any suggestions



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

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