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: 61
Default Filterable alternating row colour formula skewed when rows deleted.

I haven't tested this manually, actually, but the situation I have now
is this:

1. A3 has this formula so that the rows have alternating colour that
hold the alternating pattern even when filtered:

=AND(MOD(SUBTOTAL(3,$B3:$B$3),2)=0,$B3<"")

2. The problem lies in that the sheet is protected and because of
this, I delete cells via a delete rows macro, which is this:

Sub DeleteRow()
Dim MyMsgBox As Long
MyMsgBox = MsgBox("Are you sure you really want to delete
this/these row(s)?? :oD", vbOKCancel + vbExclamation, "Delete ... ?")

If MyMsgBox = vbOK Then

Selection.EntireRow.Delete
ActiveCell.Select
ActiveCell.Offset(-1, 0).Select

End If
' Re-protects sheet in case anything unprotects it, yet allows vb
functioning to remain.
With ActiveSheet
.EnableAutoFilter = True
.Protect UserInterfaceOnly:=True
End With
End Sub

[** Re the above codes, none of them are mine. They were kind gifts
from people in this ng.]

3. The challenge is that today I ran into a "glitch" in that rows
deleted with the above delete row macro make the alternate colouring
not work properly anymore. I'm guessing that this may happen since
rows have specific cell references and that when they're deleted, it
throws sequencing off somehow (?).

Is there another way to delete rows without knocking out the
filter-proof alternating row colouring? Seems like a tall order but
hopefully there is something that can be done.

Thanks! :oD

 
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
Change colour of cells when content is altered/changed BUT NOT TO INSERTED OR DELETED ROWS Martin ©¿©¬ @nohere.net Excel Discussion (Misc queries) 3 April 12th 08 05:13 PM
colour rows alternating colour Grd Excel Discussion (Misc queries) 6 November 13th 07 10:48 PM
Alternating row colour according to month Sarah (OGI) Excel Discussion (Misc queries) 2 May 17th 07 01:11 PM
looking for shape of right-skewed, left-skewed symmetric how do Sharon Setting up and Configuration of Excel 1 December 28th 06 12:06 AM
alternating cell colour mohd21uk via OfficeKB.com New Users to Excel 2 May 12th 06 12:17 PM


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