+ Reply to Thread
Results 1 to 12 of 12

CONDITIONAL FORMATtING

  1. #1
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    CONDITIONAL FORMATtING

    Hi

    In my worksheet i would like to apply conditional formatting to column F only if it has a value and also if the value in column G is less than or equal to zero.

    Any help please.

  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: CONDITIONAL FORMATtING

    Hi,

    Presumably with the following formula in F1 using the 'Use a formula' option, and applying to your whole column F range.

    =AND(F1<>"",G1<=0)
    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 Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: CONDITIONAL FORMATtING

    Book1.xlsm

    Hi

    That's what I thought but it doesn't highlight anything. I will attach the sheet. In row 620 it should highlight cell F but it doesn't!!!

  4. #4
    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: CONDITIONAL FORMATtING

    Hi,

    If you go back to the conditional format rule and examine what's in the box you'll see
    ="AND(F5<>"""",G5<=0)"

    instead of
    =AND(F5<>"""",G5<=0)

    i.e. there are literal quotes around the formula. Remove them and you'll be OK.

  5. #5
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: CONDITIONAL FORMATtING

    Re: CONDITIONAL FORMATtING
    Thanks it works now. If I have a macro that runs this worksheet can I add the conditional formatting to it and how and where would I do it.

    Terri

  6. #6
    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: CONDITIONAL FORMATtING

    Hi

    Perhaps the following at the start of the macro, although it may not make a difference where you add it. All depends what the rest of the macro is doing.

    Please Login or Register  to view this content.
    Change the range F1:F10 as appropriate

  7. #7
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: CONDITIONAL FORMATtING

    Hi

    The range is not a consistent number of rows is there a way around this?

    Terri

  8. #8
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: CONDITIONAL FORMATtING

    Bump. Anyone with an answer to this?

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: CONDITIONAL FORMATtING

    Untested but you can try this
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  10. #10
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: CONDITIONAL FORMATtING

    I tried to add this to my macro and it does not highlight what it should.

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: CONDITIONAL FORMATtING

    You are already working on this part in this thread http://www.excelforum.com/excel-prog...ponding-2.html right?

  12. #12
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: CONDITIONAL FORMATtING

    Quote Originally Posted by arlu1201 View Post
    You are already working on this part in this thread http://www.excelforum.com/excel-prog...ponding-2.html right?
    Yes this one here worked great as I used it as a once off so I can close this thread. I am continuously needing help in the other thread and you can see where I used this in that thread it worked. The others didn't sadly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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