Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert blank row after change in cell value not working. Wackyracer Excel Discussion (Misc queries) 1 February 2nd 10 01:11 PM
Insert a blank row after change in data Genghis2k3 Excel Worksheet Functions 3 January 11th 09 07:31 PM
insert a blank column between each column in a data file Holly Excel Discussion (Misc queries) 1 October 31st 07 07:04 PM
Insert a blank row after change in data Genghis2k3 Excel Worksheet Functions 1 March 28th 07 01:09 AM
insert blank line at change of year BillyRogers Excel Programming 4 February 16th 06 01:56 PM


All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"