+ Reply to Thread
Results 1 to 10 of 10

Conditional formatting woes

  1. #1
    Forum Contributor
    Join Date
    11-15-2012
    Location
    Buffalo, NY
    MS-Off Ver
    Office 365
    Posts
    286

    Conditional formatting woes

    I want to have a cell in one column (G) change to shaded if a non-blank value is entered in column B.
    The conditional rule I have used is not(isblank(b5)) (it is applied to cell G5). Nothing happened :-(, so I thought about adding a formula with the same 'rule'. In cell I5 I have the following =not(isblank(b5))

    This does work, yielding TRUE if there is a value in B5, and FALSE if there is no value in B5

    So:
    1) The logical test seems to work (evidenced by I5), but the conditional formatting doesn't.
    2) Each time I edit the rule, it gets mangled with extra quotes, and becomes
    ="not(isblank(b5))". If I change the rule, and precede it with an =[ ie =not(isblank(b5))], the end result is the same :-(


    Each time I try to use conditional formatting it seems to take for ever to get a good result. Various books are not particularly helpful, and the MS examples are less than forthcoming.

    Does anyone have an unambiguous syntax for setting conditional formatting rules that is robust enough to be used in commercial application?

    Thanks,

    Tony
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Conditional formatting woes

    Select G5

    Conditional Formatting
    New Rule
    Use a formula to determine...

    =(B5<>"")

    Format as required
    Use Format painter (paintbrush icon) to copy to other cells
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Conditional formatting woes

    Select G5:G10
    Go to home tab>>conditional formatting
    new rule>>use a formula to determine which cells to format
    type in the formula
    =b5<>""
    Select the format
    and its done.......
    Hope it helps
    Do ask for any other query you may have…

    If you are satisfied then mark then PLEASE mark this thread as “SOLVED” (by going to thread tools at the top and clicking on “mark this thread as solved”) and you can just click on ADD REPUTATION below my post to say thanks...

    Regards
    Sourabh Gupta

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,100

    Re: Conditional formatting woes

    Hi.

    Remove the " from around your CF formula and BINGO...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Conditional formatting woes

    if there is value in Column B then you want to shade the Column G
    am i right?
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Conditional formatting woes

    With G5 selected, click on Conditional Formatting | Manage Rules, select the rule shown and click on Edit Rule, and change your formula to this:

    =B5<>""

    then click OK. You can use the Format Painter icon to apply the same rule to cells below G5.

    Hope this helps.

    Pete

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Conditional formatting woes

    Instead of ="not(isblank(b5))"
    try
    =NOT(ISBLANK(B5))
    or =len(b5)>0

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditional formatting woes

    There are times when you might want to take advantage of the formula that you have created for TRUE and FALSE. In such cases in Conditional Formatting use this.

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


    The previous formulae given work perfectly fine without the TRUE/FALSE column.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  9. #9
    Forum Contributor
    Join Date
    11-15-2012
    Location
    Buffalo, NY
    MS-Off Ver
    Office 365
    Posts
    286

    Re: Conditional formatting woes

    Thanks for the point about using a related formula.
    The 'extra column' showing the result of the formula I was using was only to show that value (ie that Conditional Formatting was not working as I expected). The resolution was - as almost always in such cases - depressingly simple.

    T

  10. #10
    Forum Contributor
    Join Date
    11-15-2012
    Location
    Buffalo, NY
    MS-Off Ver
    Office 365
    Posts
    286

    Re: Conditional formatting woes

    Many thanks to those who shared the importance of adding a "=" before the formula. I had always regarded this as a different syntactic thingy from the B5<>"", but I suppose those as writes the software get to set the rules. At any rate, the problem is now solved - until I forget it the next time ;-)

    Thanks, as always, to this wonderful group,

    Tony

+ 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. Conditional formatting woes
    By Craized in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2014, 08:25 AM
  2. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  3. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  4. Conditonal Formatting woes
    By JamesWyatt in forum Excel General
    Replies: 9
    Last Post: 03-13-2012, 06:28 AM
  5. More Conditional Formatting Woes
    By rmcgal in forum Excel General
    Replies: 10
    Last Post: 08-18-2005, 06:05 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