Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I insert a blank line when category changes

In Excel 2003, I have a spreadsheet with over 1500 rows that I would like to
insert a blank row everytime the category changes in one row.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default How do I insert a blank line when category changes

for i =cells(rows.count,"a").end(xlup).row to 2 step -1
if cells(i,"a")=categorychange then rows(i).insert
next

--
Don Guillett
SalesAid Software

"castleds" wrote in message
...
In Excel 2003, I have a spreadsheet with over 1500 rows that I would like
to
insert a blank row everytime the category changes in one row.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I insert a blank line when category changes

Sub InsertRow_At_Change()
Dim i As Long
With Application
.Calculation = xlManual
.ScreenUpdating = False
End With
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(i - 1, 1) < Cells(i, 1) Then _
Cells(i, 1).Resize(1, 1).EntireRow.Insert
Next i
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub


Gord Dibben MS Excel MVP

On Wed, 27 Sep 2006 06:35:01 -0700, castleds
wrote:

In Excel 2003, I have a spreadsheet with over 1500 rows that I would like to
insert a blank row everytime the category changes in one row.


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
How, on a line chart, to skip blank entry rather than plot as 0? JohnTerp Charts and Charting in Excel 1 July 12th 06 11:11 PM
insert a blank in every second line of a row EliseT Excel Discussion (Misc queries) 6 June 5th 06 01:43 PM
How can I insert a blank row after every row with data with Excel margaret1115 Excel Discussion (Misc queries) 2 May 9th 06 11:02 PM
How do I insert manual line breaks in excel? sldwrks84 Excel Worksheet Functions 2 January 12th 06 04:49 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


All times are GMT +1. The time now is 02:28 AM.

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

About Us

"It's about Microsoft Excel"