+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting Behavior When Deleting Rows

  1. #1
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Conditional Formatting Behavior When Deleting Rows

    I am having trouble with conditional formatting. In my named range (Log!TotalFeeArea), using the formula option, I have conditional formatting which changes the font color if a condition is
    true. (Changing to red is an error condition which is being highlighted to the user.) The structure I have set up works fine until I (as an application functional requirement) delete a row
    from Log!TotalFeeArea. When I do so, the relative references in the condition formula get messed
    up in a way don't understand or want. It is not merely the normal adjusting of a relative address for the deleted row. If you decide to play with the attached WB, try deleting row 17 in Log
    and you'll see many of the dollar figures in TotalFeeArea change to red...this should not happen. Deleting a row should not affect the non-deleted rows.

    A little more background: I had trouble managing the conditional formula in the conditional formatting dialog box when the formula was long, so, I put the formulas
    (which result in logical true or false) in cells in another worksheet (Shadow) and had the conditional formula more simply refer to the formula on the Shadow worksheet.
    The formulas in Shadow worksheet cells correspond one-for-one with the cells in Log!TotalFeeArea. So, the conditional formula for the upper left cell of Log!TotalFeeArea
    which is cell Log!D14 is Shadow!D14. The area it applies to is specified as TotalFeeArea. I set this up by initially entering the condition in Log!D14,
    and then I copy and paste-formatting to get the conditional formatting applied to the rest of TotalFeeArea. I do notice that when I review the conditional formula that has been pasted
    into other cells in TotalFeeArea (ex G17), the condition listed is Shadow!d14, but the behavior is as desired ... as if the formula is Shadow!G17. Maybe this is the source of my
    problem?

    Aside: prior to relocating the longer conditional formula from the conditional formatting dialog to the Shadow worksheet, I had the same problem (and more) when deleting rows.

    More background: The formulas in Shadow have been constructed using the INDIRECT function to prevent Excel from modifying the formulas where they reference any row
    that is deleted. Without this, the Shadow formulas result in #REF corresponding to the rows that were deleted in Log.

    Is there a way that I can construct the conditional formulas for TotalFeeArea so that deleting a row does not give me unintended result? Or is there another approach entirely.

    Thanks for any help!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,971

    Re: Conditional Formatting Behavior When Deleting Rows

    Dynamic TotalFeeArea:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Re: Conditional Formatting Behavior When Deleting Rows

    I am possibly misunderstanding "quick reply". I have done it twice but cannot see it in the thread. I'm trying again:

    Thanks for your suggestion. I tried it and still had the same problem with the conditional formats in the TotalFeeArea after doing a delete of a row within it.

    It is difficult debug because the formulas appear messed up even before doing the delete, but nevertheless the conditional formatting works as intended....until doing a delete of a row.

    I may have to just think of another UI design to communicate to the user that an illegal fee has been entered.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,971

    Re: Conditional Formatting Behavior When Deleting Rows

    I slightly modified the formula:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Re: Conditional Formatting Behavior When Deleting Rows

    I tried the file you returned. I got the same problem when I delete a row. Is it possible I have some installation level setting that is making is fail on my machine?

    Thanks for you help again!

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,971

    Re: Conditional Formatting Behavior When Deleting Rows

    I can't reproduce your errors so I don't know what to try next, sorry.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Deleting rows not highlighted by conditional formatting
    By JakeMann in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 08:01 AM
  2. Deleting rows without conditional formatting
    By ShawnaC in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2013, 02:38 PM
  3. Maintain conditional formatting when deleting rows
    By FrederikBjerre in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-06-2011, 09:07 AM
  4. Conditional formatting: deleting entire rows
    By CEM in forum Excel General
    Replies: 5
    Last Post: 09-14-2010, 05:47 PM
  5. Deleting rows based on Conditional Formatting
    By Yobari in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-11-2009, 01:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1