LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Problem with Conditional Formatting when Inserting a Row

I currently have a procedure that allows the users to click on a button
to move a selected row up or down in a list. The problem I'm having is
that when they move the rows down the conditional formating on the
cells get screwed up. Below is an example of what happens when I try to
move row 1 down to row 2.

Conditional Formatting Formulas Prior to Move.
(There is actually 2 conditions in each, but for simplicty I just used
1).
Row 1 = "=$A1"
Row 2 = "=$A2"
Row 3 = "=$A3"

Conditional Formatting After I moved row one down to row 2.

Row 1 = Formatting is gone
Row 2 = "=$A4"
Row 3 = "=$A5"

Here is the part of the code that I use to move the rows. The problem
seems to occur when I use the insert statement.

MoveFrom = Selection.Row
Rows(MoveFrom).Select
Selection.Cut
Rows(MoveFrom + 2).Select
Selection.Insert shift:=xlDown
Rows(MoveFrom + 1).Select

The thing that makes this more frustrating is that I don't get the same
problem when the user moves a row up. It's basically the same logic.
Any help would be greatlty appreciated.

Thanks,
James

 
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
Conditional Formatting - Inserting Rows Danny Excel Worksheet Functions 1 March 2nd 10 09:39 PM
Inserting a new column affects conditional formatting tino2009 New Users to Excel 9 June 29th 09 10:18 AM
Conditional Formatting problem Alan[_11_] Excel Worksheet Functions 1 March 11th 08 06:56 PM
Conditional Formatting when inserting a row zahoulik Excel Worksheet Functions 2 January 7th 06 03:01 PM
Conditional Formatting Reference / Inserting Rows Werner Rohrmoser Excel Worksheet Functions 1 September 9th 05 02:27 PM


All times are GMT +1. The time now is 06:23 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"