Calculate number of total rows when new rows are added at given interval

dicken

Active Member
Joined
Feb 12, 2022
Messages
283
Office Version
  1. 365
Platform
  1. Windows
Hi, I've been trying to write a formula to calculate the number of rows when new rows are inserted at a give interval,

so in this case I have , keeping it simple, 13 rows, and I want to insert 3 rows at every 2nd row,

so ( ( 13 /2 ) * 3 ) + 13 , but I don't want rows added to then end; the best I've come up with so far is this, but are there better ways ?

Excel Formula:
 =( IF( 13/2 = QUOTIENT(13,2) ,  ( (QUOTIENT(13,2)-1)* 3) + 13  , (QUOTIENT(13,3)*3) + 13 ))   -3,



Richard.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Just, to add, see edit option? , the problem is to to deal with extra unwanted rows, so if grouping by 2, then both 13 and 14 want there last insert at
what will be row 27. as this is to used to find the positions of where rows need to be inserted.
 
Upvote 0
Try:
Excel Formula:
=(QUOTIENT(13,2)-IF(ISODD(13),1,2))*3+13
 
Upvote 1

Forum statistics

Threads
1,215,420
Messages
6,124,803
Members
449,190
Latest member
cindykay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top