ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert Blank row at change in a given Column (https://www.excelbanter.com/excel-programming/402164-insert-blank-row-change-given-column.html)

Karthik

Insert Blank row at change in a given Column
 
Hi All,

I would like to create a macro to insert a blank rows at every change
in a column. I also want to give the input box option to select the
column.

Thanks for the help!!

Regards,

Karthik

joel

Insert Blank row at change in a given Column
 
Sub addcol()

ColmLetter = InputBox("Enter column Letter : ")

Lastrow = Cells(Rows.Count, ColmLetter).End(xlUp).Row
For RowCount = Lastrow To 2 Step -1
If Range(ColmLetter & RowCount) < _
Range(ColmLetter & (RowCount - 1)) Then

Rows(RowCount).Insert
End If
Next RowCount

End Sub


"Karthik" wrote:

Hi All,

I would like to create a macro to insert a blank rows at every change
in a column. I also want to give the input box option to select the
column.

Thanks for the help!!

Regards,

Karthik



All times are GMT +1. The time now is 12:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com