Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to thank everyone in advance for looking into this for me.
I currently have a macro that inserts a blank row after every cell in column A that changes. See below: Tom Tom Tom Dick Dick Harry Harry Harry The macro would insert a row after the 3rd Tom, the 2nd Dick, and the third Harry. I have come across the need to be able to pick which column I want the macro to examine. Sometimes column A, sometimes AB, etc. Any suggestions? Thanks again Jeff |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
first think to come to mind.... you can use inputbox to prompt for parameters. in this case it might be column letter. but since you didn't post any code, i have no idea where to put it or how to use it. -----Original Message----- I would like to thank everyone in advance for looking into this for me. I currently have a macro that inserts a blank row after every cell in column A that changes. See below: Tom Tom Tom Dick Dick Harry Harry Harry The macro would insert a row after the 3rd Tom, the 2nd Dick, and the third Harry. I have come across the need to be able to pick which column I want the macro to examine. Sometimes column A, sometimes AB, etc. Any suggestions? Thanks again Jeff . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry. Had it on my clipboard and everything. Here it is.
Sub InsertRows() Dim cRows As Long Dim i As Integer For i = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1 If Cells(i, "A") < Cells(i + 1, "A") Then Cells(i + 1, "A").EntireRow.Insert End If Next i End Sub " wrote: hi, first think to come to mind.... you can use inputbox to prompt for parameters. in this case it might be column letter. but since you didn't post any code, i have no idea where to put it or how to use it. -----Original Message----- I would like to thank everyone in advance for looking into this for me. I currently have a macro that inserts a blank row after every cell in column A that changes. See below: Tom Tom Tom Dick Dick Harry Harry Harry The macro would insert a row after the 3rd Tom, the 2nd Dick, and the third Harry. I have come across the need to be able to pick which column I want the macro to examine. Sometimes column A, sometimes AB, etc. Any suggestions? Thanks again Jeff . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count/Sum rows of a column depending on criteria from drop-down li | Excel Worksheet Functions | |||
How do I add a variable range of columns depending on criteria | Excel Worksheet Functions | |||
Copying rows depending on criteria set? | Excel Discussion (Misc queries) | |||
Insert rows depending on entry in certain column | Excel Programming | |||
deleting the rows depending on the result of a condition involving two columns. | Excel Programming |