Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default insert row using conditional formatting

I have a fairly large worksheet with a number of stores listed and their
sales for the year. Some stores have entries for 10 years, some have only
one. I would like to insert a blank row between the different stores,
keeping the same store info together. Is there any way to do this with
conditional formatting or a macro? Doing it manually would take way too much
time.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default insert row using conditional formatting

hi
not with conditional formating but you can do it with a macro.
how is your data layed out? since you are wanting to add a row between
stores, i assume that is a solid block of data.
what column has the key that distinguishes one store form another?
post back and i'll work on it for you.

regards
FSt1

"peabody" wrote:

I have a fairly large worksheet with a number of stores listed and their
sales for the year. Some stores have entries for 10 years, some have only
one. I would like to insert a blank row between the different stores,
keeping the same store info together. Is there any way to do this with
conditional formatting or a macro? Doing it manually would take way too much
time.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default insert row using conditional formatting

Not with CF but here is a macro from Sandy Mann

Assumes store names are in column A

Sub InsertRow_At_Change()
'Sandy Mann July 1st, 2007
Dim LastRow As Long
Dim X As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False

For X = LastRow To 3 Step -1
If Cells(X, 1).Value < Cells(X - 1, 1).Value Then
If Cells(X, 1).Value < "" Then
If Cells(X - 1, 1).Value < "" Then
Cells(X, 1).EntireRow.Insert Shift:=xlDown
End If
End If
End If
Next X
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP


On Mon, 7 Jan 2008 13:08:00 -0800, peabody
wrote:

I have a fairly large worksheet with a number of stores listed and their
sales for the year. Some stores have entries for 10 years, some have only
one. I would like to insert a blank row between the different stores,
keeping the same store info together. Is there any way to do this with
conditional formatting or a macro? Doing it manually would take way too much
time.


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
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
Insert Images Using Conditional Format (Many) Mike Garcia Excel Discussion (Misc queries) 4 October 4th 07 03:25 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 3 January 20th 07 02:02 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 09:30 PM.

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"