+ Reply to Thread
Results 1 to 5 of 5

need help with conditional formatting

  1. #1
    Registered User
    Join Date
    02-16-2013
    Location
    Folsom, CA
    MS-Off Ver
    Excel 2010
    Posts
    47

    need help with conditional formatting

    I have a column A1:A10 that sums up all "yes" entries in cell A12 using:

    COUNTIF(A1:A10,"=yes")

    What I would like Excel to do is actually delete these entries if the sum of all "yes" exceeds 8. I had the idea that I could use conditional formatting to change the text color of each "yes" to white if the sum is > 8, and this would in effect erase them because you wouldn't be able to see them (note that it doesn't matter to me that A12 still shows a number). I tried using the following formula:

    =AND(A1="yes",A12>8)

    It works, but only for cell A1. I tried both dragging the formula across and entering the formula as

    =AND(A1:A10="yes",A12>8)

    What am I doing wrong? Also, would there be a way to make Excel actually delete all "yes" if there were more than 8? I would want it to delete only the "yes", not any other entries.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: need help with conditional formatting

    Hi,

    Just change the A12 to $A$12 in your conditional formatting code.

    Please remember, your request is clearer if you attach a sample workbook.
    - Click on Go Advanced and click on the Paper Clip.
    When you reply please make it clear WHO you are responding to by mentioning their name.
    If we have been of assistance, please let us know. A little thanks goes a long way.
    - Please click on the *Add Reputation button at the bottom of helpful responses.
    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

  3. #3
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: need help with conditional formatting

    Quote Originally Posted by dzugan View Post
    Also, would there be a way to make Excel actually delete all "yes" if there were more than 8? I would want it to delete only the "yes", not any other entries.
    dzugan

    I forgot to respond to this bit.

    I think you would have to resort to macros to accomplish this! How comfortable are you with adding a macro?

    If you want to avoid macros, and do it manually, the best way would be to use the autofilter feature, filter on the column with Yes and delete the rows.

    Regards,

    David

  4. #4
    Registered User
    Join Date
    07-20-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: need help with conditional formatting

    See Picture attach
    =IF(A12>8,"True")
    solution.jpg

  5. #5
    Registered User
    Join Date
    02-16-2013
    Location
    Folsom, CA
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: need help with conditional formatting

    Ah, stupid me! Thank you. BTW, I did attach the file.

+ 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. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  2. Replies: 2
    Last Post: 09-19-2013, 10:34 AM
  3. Delete Conditional Formatting conditions but keep cell formatting - Excel 2010
    By tetreama in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2012, 08:28 PM
  4. Replies: 3
    Last Post: 05-15-2012, 04:13 PM
  5. Macro for formatting fonts and cell colours - not Conditional Formatting
    By Kayaness in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-07-2011, 03:46 AM

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