+ Reply to Thread
Results 1 to 11 of 11

Formula for conditional formatting a cell to blank based on value

  1. #1
    Registered User
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    99

    Formula for conditional formatting a cell to blank based on value

    I need to apply a conditional formating to a spreadsheet to make cells blank if the text is equal to "Off"

    I fteh Text is something other then Off then I want the text to show.

    how would I use the If this then that formula

    =if("Off"," ","")

    Thank you
    Last edited by nsmjc; 01-05-2020 at 10:20 AM. Reason: Solved

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula for conditional formatting a cell to blank based on value

    Hi

    Use the CF 'Formula' option

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and set the CF for the text to the same colour as the sheet background, i.e. white unless you've changed it.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Formula for conditional formatting a cell to blank based on value

    I am not quite clear hwta you mean by conditional formatting here, as you have attempted an IF statement.

    If it's a formula you need, then maybe this in B1 for example:

    =IF(A1="Off","","Text you wish to show")

    If it's a cse of making A1 appear empty if it contains "Off", then the CF rule would be this:

    =A1="Off"

    and the text formatting would be white.

    If you can't work it out from this, attach a sample workbook,
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Formula for conditional formatting a cell to blank based on value

    I need to apply this to all the cells and I need a blank as the rows alternate color so changing it to white will not work. I thought putting it into a conditional format for the entire sheet would work best.

    I just cannot figure out how to make all the cells with the word off in them go blank.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Formula for conditional formatting a cell to blank based on value

    As I said, attach a sample workbook.

  6. #6
    Registered User
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Formula for conditional formatting a cell to blank based on value

    Sorry I Thought I did here is the sample I need all the Off to show Blank

    It gets its data from a form. So if a box is not checked it is Off we need to hid all the Off so we can easier see the Yes and No
    Attached Files Attached Files

  7. #7
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula for conditional formatting a cell to blank based on value

    Since you have a table, do as Richard suggests

    In CF

    Cell value = "Off"
    -- White font -- White background.

    See attached

    formula-for-conditional-formatting-a-cell-to-blank-based-on-value-force-response-results-master.xlsx
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  8. #8
    Registered User
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Formula for conditional formatting a cell to blank based on value

    Yes but that takes away from the alternating row colors and is not visually complete is there a way to do this while keeping the row colors intact.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Formula for conditional formatting a cell to blank based on value

    With cell A2 selected, set the following TWO rules:

    =AND(ISODD(ROW()),A2="Off") - set text to white

    =AND(ISEVEN(ROW()),A2="Off") - set text to blue to match the blue rows

    Apply both rules to: =$A$2:$P$22 (or extend to suit)

  10. #10
    Registered User
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    99

    SOLVED: Formula for conditional formatting a cell to blank based on value

    That worked thank you

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Formula for conditional formatting a cell to blank based on value

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. [SOLVED] Conditional formatting for blank cell based on another cells date
    By trent88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2019, 12:50 PM
  2. [SOLVED] How to ignore blank cell containing a formula with conditional formatting
    By AMille in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-21-2018, 12:41 PM
  3. Replies: 8
    Last Post: 05-07-2014, 04:57 AM
  4. [SOLVED] Conditional Formatting a blank cell based on another cell's date
    By krista_o in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2014, 04:13 PM
  5. Conditional formatting blank cells based on another cell value
    By 6MPS in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-14-2013, 11:59 AM
  6. Replies: 11
    Last Post: 10-26-2012, 09:45 PM
  7. Replies: 1
    Last Post: 04-24-2008, 01:32 PM

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