Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
new
Insert row at each change of surname in column
-- De |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
new
Sub insertrowifnamechg()
mc = "a" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i - 1, mc) < Cells(i, mc) Then Rows(i).Insert Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "De" wrote in message ... Insert row at each change of surname in column -- De |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
new
Subtotal
"De" wrote in message ... Insert row at each change of surname in column -- De |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
new
I can't see how I can insert a row using subtotals; the only option seems to
be page break. Is there a way to insert a row? Many thanks, -- De "Stephen" wrote: Subtotal "De" wrote in message ... Insert row at each change of surname in column -- De |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
new
I assumed you wanted to do something with the inserted rows, so I was
thinking of Data Subtotals which allows you to specify what you want to do on the inserted rows (sum, average, etc.) "De" wrote in message ... I can't see how I can insert a row using subtotals; the only option seems to be page break. Is there a way to insert a row? Many thanks, -- De "Stephen" wrote: Subtotal "De" wrote in message ... Insert row at each change of surname in column -- De |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
new
Showing my ignorance but is this a macro? Because it doesn't look like it
will go on the formula bar. -- De "Don Guillett" wrote: Sub insertrowifnamechg() mc = "a" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i - 1, mc) < Cells(i, mc) Then Rows(i).Insert Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "De" wrote in message ... Insert row at each change of surname in column -- De |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
new
Many thanks for this but is is a macro? I tried it as both a macro and in
the formula bar but I'm not confident with macros so I might not have got it right. -- De "Don Guillett" wrote: Sub insertrowifnamechg() mc = "a" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i - 1, mc) < Cells(i, mc) Then Rows(i).Insert Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "De" wrote in message ... Insert row at each change of surname in column -- De |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
new
A formula could not insert a row. This is a macro If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Don Guillett Microsoft MVP Excel SalesAid Software "De" wrote in message ... Many thanks for this but is is a macro? I tried it as both a macro and in the formula bar but I'm not confident with macros so I might not have got it right. -- De "Don Guillett" wrote: Sub insertrowifnamechg() mc = "a" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i - 1, mc) < Cells(i, mc) Then Rows(i).Insert Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "De" wrote in message ... Insert row at each change of surname in column -- De |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
new
Many tks for the help.
-- De "Don Guillett" wrote: Sub insertrowifnamechg() mc = "a" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i - 1, mc) < Cells(i, mc) Then Rows(i).Insert Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "De" wrote in message ... Insert row at each change of surname in column -- De |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|