Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How do I insert a row for every change in value for column C?
I need it to separate data Currently I sort the spreadsheet and then scroll thru the entire thing inserting rows for each variable listed in column C. Example: Value in rows 1 thru 5 of column C are 27; and the value in rows 6 thru 8 are 28; rows 9 & 10 are 29 and so on and so on. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
First add a header row if you haven't.
Then after you sort your data, select the data (header row through the last row of data) and do: Data|subtotals And follow the wizard from there. You can even add subtotals to columns/fields that you want! Luthdawg wrote: How do I insert a row for every change in value for column C? I need it to separate data Currently I sort the spreadsheet and then scroll thru the entire thing inserting rows for each variable listed in column C. Example: Value in rows 1 thru 5 of column C are 27; and the value in rows 6 thru 8 are 28; rows 9 & 10 are 29 and so on and so on. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this:
Sub InsertRow() With Worksheets("sheet1") '<=== change to suit Lastrow = .Cells(Rows.Count, "C").End(xlUp).Row For irow = Lastrow To 2 Step -1 If .Cells(irow - 1, "C") < .Cells(irow, "C") Then Rows(irow).Insert Shift:=xlDown End If Next End With End Sub "Luthdawg" wrote: How do I insert a row for every change in value for column C? I need it to separate data Currently I sort the spreadsheet and then scroll thru the entire thing inserting rows for each variable listed in column C. Example: Value in rows 1 thru 5 of column C are 27; and the value in rows 6 thru 8 are 28; rows 9 & 10 are 29 and so on and so on. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using SUBSTITUTE multiple times on single cell of data | Excel Discussion (Misc queries) | |||
Inserting Data Repeated Times | Excel Discussion (Misc queries) | |||
Combining data from multiple worksheets and separate spreadsheets | Excel Discussion (Misc queries) | |||
Displaying single and multiple data series.Single data series | Charts and Charting in Excel | |||
Multiple dates, times, or formulas in a single cell | Excel Discussion (Misc queries) |