+ Reply to Thread
Results 1 to 8 of 8

Formula is TRUE as worksheet formula but does not format cell as CF rule

  1. #1
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Formula is TRUE as worksheet formula but does not format cell as CF rule

    Stripped down version (original is part of a calendar). The formula is TRUE in all the formatted cells. But the same formula used as a CF rule is not formatting the cells.

    I suspect I am missing something obvious but it's so obvious I can't see it. Both screen shots and file attached.

    CF oddity.JPG

    CF oddity2.jpg
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  2. #2
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,978

    Re: Formula is TRUE as worksheet formula but does not format cell as CF rule

    I think you might need to fix C5:

    C$5
    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.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Formula is TRUE as worksheet formula but does not format cell as CF rule

    That reference is for the target cell. It must be a relative reference based on how the formula works. In the full sheet the large square is replicated, so the formula should work in any large square to check the value of the cell in the upper-left corner. If the row is an absolute reference then ROW will always be the same and the offset will not work. I tried this change anyway but the CF rule still did not work.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,082

    Re: Formula is TRUE as worksheet formula but does not format cell as CF rule

    I seem to remember coming across this before & CF does not like offset in an AND function. Do you need to check is the column is odd?
    Assuming the number will always be in an even numbered column, you should be able to just use the Offset on it's own.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Formula is TRUE as worksheet formula but does not format cell as CF rule

    I am trying to come up with a single formula that will work in all columns. The odd columns have a different criterion than the even columns; this example is just for the odd columns. I suppose I could just give in and use two rules.

    When I remove the AND and the ISODD condition, the rule does work.

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

    Re: Formula is TRUE as worksheet formula but does not format cell as CF rule

    =isodd(column(c5))*(offset(c5,-mod(row(c5)-5,7),-1)=19)?
    Ben Van Johnson

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Formula is TRUE as worksheet formula but does not format cell as CF rule

    Quote Originally Posted by protonLeah View Post
    =isodd(column(c5))*(offset(c5,-mod(row(c5)-5,7),-1)=19)?
    Brilliant! That does work. I have an aversion to using boolean values in arithmetic so this never occurred to me, but it's the perfect time to use it.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Formula is TRUE as worksheet formula but does not format cell as CF rule

    Full problem and full solution for anyone interested

    https://www.excelforum.com/excel-for...endar-day.html

+ 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] Conditionally format certain cells based on a specific rule (formula maybe)
    By q988988 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-27-2020, 01:51 AM
  2. [SOLVED] Data Validation Rule: Not Function with Exceptions to the rule
    By KidZest in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-18-2019, 11:45 PM
  3. [SOLVED] Establish a Format rule and Formula based on >= + Counta
    By alan_stephen75@ in forum Excel General
    Replies: 4
    Last Post: 01-19-2017, 07:43 AM
  4. Merged cell format rule.
    By EnG_TeLeCoMm in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 10-25-2016, 07:07 AM
  5. Replies: 5
    Last Post: 02-13-2011, 01:01 PM
  6. Pop up box rule if tick box not true
    By tuckjoseph in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-26-2010, 11:26 AM
  7. Conditional Format - Formula Rule
    By 2709236 in forum Excel General
    Replies: 2
    Last Post: 09-15-2009, 06:17 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