Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
My data is in a single Column from Row 2 to 6000. I need to add the values
after every 5 Rows. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
You can try writing this macro. Let me know if it helps: Sub addRows() Dim intcount As Integer For intcount = 7 To 7200 Step 6 ' The first formula will appear in row 7 and there will be ~1200 such formula cells. So total is 7200 ThisWorkbook.Worksheets("Sheet1").Range("A" & intcount).Select Selection.Insert Shift:=xlDown Selection.Formula = "=Sum(A" & intcount - 1 & ":A" & intcount - 5 & ")" Selection.Font.Bold = True ' To distinguish the totals row in bold Selection.Font.ColorIndex = 3 ' To distinguish the totals row in Red Next intcount End Sub "TUKUR" wrote in message ... My data is in a single Column from Row 2 to 6000. I need to add the values after every 5 Rows. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would add another column (say A) and put this in A2:
=INT((ROW()-2)/5) And drag down. Then I could select my range and do Data|Subtotals and create a subtotal based on that column. TUKUR wrote: My data is in a single Column from Row 2 to 6000. I need to add the values after every 5 Rows. -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You are too much! More blessings for you.
"Dave Peterson" wrote: I would add another column (say A) and put this in A2: =INT((ROW()-2)/5) And drag down. Then I could select my range and do Data|Subtotals and create a subtotal based on that column. TUKUR wrote: My data is in a single Column from Row 2 to 6000. I need to add the values after every 5 Rows. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy rows of data (eliminating blank rows) from fixed layout | Excel Discussion (Misc queries) | |||
Merge data rows at fixed ratio | Excel Discussion (Misc queries) | |||
Hiding Specific Rows Based on Values in Other Rows | Excel Worksheet Functions | |||
Extracting rows based on fixed criteria | Excel Discussion (Misc queries) | |||
fixed Rows at top of sheet | New Users to Excel |