Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have this macro, which I got from some guru in this database a few years
ago, which has always worked, and but won't work in the spreadsheet I'm working on today. The macro inserts a blank row wherever there's a change in whatever column you select. The column I'm selecting has data that sometimes starts with a number, sometimes with a symbol, sometimes with a letter. Is it because of that that this macro won't work? Sub InsertRow_At_Change() Dim i As Long Dim colno As Long colno = InputBox("Enter a Column Number") With Application .Calculation = xlManual .ScreenUpdating = False End With For i = Cells(Rows.Count, colno).End(xlUp).Row To 2 Step -1 If Cells(i - 1, colno) < Cells(i, colno) Then _ Cells(i, colno).Resize(1, 1).EntireRow.Insert Next i With Application .Calculation = xlAutomatic .ScreenUpdating = True End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need VBA script to auto-insert value upon row insert | Excel Worksheet Functions | |||
insert row / insert column command buttons | Excel Worksheet Functions | |||
How can I insert a date with an icon (calendar) insert | Excel Discussion (Misc queries) | |||
Can I auto insert a worksheet when I insert a value in a cell. | Excel Worksheet Functions | |||
Insert Next? Or insert a variable number of records...how? | Excel Discussion (Misc queries) |