+ Reply to Thread
Results 1 to 19 of 19

Conditional Formatting formula not working

  1. #1
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Conditional Formatting formula not working

    Greeting,

    I am having strange issue with my 'Conditional Formatting' formula. It was working fine from couple of month back, but some-home the formula in 'Conditional Formatting' not working at all.

    I have month drop down list in X7 and manually typed date in C5. What I was trying to achieve is to match the month selected in X7 with month C5 and vice-versa.
    But if month in X7 changes month in C5 get strikethrough and if both month are same in X7 & C5 then should not be strike-through. This which is some how not working now.

    Please Login or Register  to view this content.
    Please see the attach Excel file.
    Condintional Formating.xlsx

    Any solution on this will be appreciated.

    Thank you

    Best,

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional Formatting formula not working - Need help :(

    If I change X7 to March, then C6 is no longer struck-through and is not red filled. In what way is it not working for you?
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Conditional Formatting formula not working - Need help :(

    Quote Originally Posted by Aardigspook View Post
    If I change X7 to March, then C6 is no longer struck-through and is not red filled. In what way is it not working for you?
    Hi Aardigspook, Thank you for your reply. its not working for me.

    Please see the attach image.

    In C6 struck-through/highlighted is correct as the month in X7 is January. But C5 should not be struck-through/highlighted because C5 & X7 have same month January.

    0000a.jpg

    Please let me know if it not clear what I'm trying to achieve.

    Best,
    Last edited by pipsmultan; 04-04-2019 at 03:33 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Conditional Formatting formula not working

    Hi pipsmultan,

    FWIW your spreadsheet is working fine for me. You need to troubleshoot why the formula in your conditional format isn't returning what you'd expect. I'd suggest copying it into a cell on your spreadsheet and evaluating the values within it using the F9 key. E.g. what result is being returned by the TEXT($C5,"mmmm") part of your formula and what is being returned by $X$7? There'll be a reason why they don't match.

    Hope this helps.

    Snook

  5. #5
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Conditional Formatting formula not working

    Quote Originally Posted by The_Snook View Post
    Hi pipsmultan,

    FWIW your spreadsheet is working fine for me. You need to troubleshoot why the formula in your conditional format isn't returning what you'd expect. I'd suggest copying it into a cell on your spreadsheet and evaluating the values within it using the F9 key. E.g. what result is being returned by the TEXT($C5,"mmmm") part of your formula and what is being returned by $X$7? There'll be a reason why they don't match.

    Hope this helps.

    Snook

    Hi Snook,

    Thank you for your reply. Yeah its very strange CF formula not working for me. I have done the test using F9 key please see the attach image

    001dd.jpg

    Is there any other formula or way out i can use instead of the below formula, as this formula use to work for me without any issue on Excel 2010 but as i have upgraded to Excel 365 its not working anymore.
    Please Login or Register  to view this content.
    Best,
    Naveed Arif

  6. #6
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Conditional Formatting formula not working

    How about trying

    =MONTH($C5)<>MONTH(DATEVALUE($X$7&" 1"))

    PS - The conditional format in your screenshot looks ok because neither of the dates input are in February.
    Last edited by The_Snook; 04-04-2019 at 05:30 AM.

  7. #7
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Conditional Formatting formula not working

    Quote Originally Posted by The_Snook View Post
    =MONTH($C5)<>MONTH(DATEVALUE($X$7&" 1"))
    Very strange this formula only work for the month 'Aug, Sept, Nov, Dec. If i chose another many its doesn't work.

    Quote Originally Posted by The_Snook View Post
    PS - The conditional format in your screenshot looks ok because neither of the dates input are in February.
    It does't mater which month you I chose C5 will remains struck-through

    Best,
    Naveed Arif

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

    Re: Conditional Formatting formula not working

    The CF worked for me okay, although the cells C7 and C8 were also highlighted even though they were empty. You can change the CF rule to this:

    =AND($C5<>"",TEXT($C5,"mmmm")<>$X$7)

    to avoid that from happening.

    It also occurred to me that you might need to use a different letter than "m" in your format string, if the Swedish word for Month does not begin with M. In French you have to use "aaaa" instead of "yyyy" for year (annee), so it might be something similar with you.

    Hope this helps.

    Pete

  9. #9
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Conditional Formatting formula not working

    It's difficult to diagnose because I'm not experiencing the same issue as you.

    When you select January as the month what numbers are being returned in the formula bar when you select and 'F9' the 'MONTH($C5)' and 'MONTH(DATEVALUE($X$7&" 1"))' portions of the formula? The formula bar should then look like this '=1<>1'.

  10. #10
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Conditional Formatting formula not working

    Quote Originally Posted by Pete_UK View Post
    You can change the CF rule to this:

    =AND($C5<>"",TEXT($C5,"mmmm")<>$X$7)
    Hi Pete thank you for help but when we apply your CF rule formula we get below error message. Can you please check and help. Thanks

    error.jpg


    Quote Originally Posted by Pete_UK View Post
    It also occurred to me that you might need to use a different letter than "m" in your format string, if the Swedish word for Month does not begin with M. In French you have to use "aaaa" instead of "yyyy" for year (annee), so it might be something similar with you
    I think you right it might be because of the format string. We normally share our files colleagues in Asia and back and forth.

    Is there any general CF rule that we can use so we doesn't this kind of error as give us a a lot confusion.

    Best,

  11. #11
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Conditional Formatting formula not working

    Quote Originally Posted by The_Snook View Post
    It's difficult to diagnose because I'm not experiencing the same issue as you.

    When you select January as the month what numbers are being returned in the formula bar when you select and 'F9' the 'MONTH($C5)' and 'MONTH(DATEVALUE($X$7&" 1"))' portions of the formula? The formula bar should then look like this '=1<>1'.
    Hi Snook,

    Yes this can be difficult to diagnose. But we think this is because of different Zone format string. As we are located in Sweden and our colleagues in Asia, they normally did counter this issue only we i think.
    Is there any general CF rule that we can use for these kind of these errors.

    Thanks!

    Best,

  12. #12
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Conditional Formatting formula not working

    Hi pipsmultan,

    Not that I'm aware of, my knowledge doesn't extend to the nationality differences between products I'm afraid.

    Regards,

    Snook

  13. #13
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Conditional Formatting formula not working

    HI Snook,

    No worries, Thank you for you help. We are figuring out the solution but haven't reach to a solution yet.

    Best,
    Naveed Arif

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

    Re: Conditional Formatting formula not working

    Quote Originally Posted by pipsmultan View Post
    ... when we apply your CF rule formula we get below error message ...
    All I did was to add the terms in red to your existing formula:

    =AND($C5<>"",TEXT($C5,"mmmm")<>$X$7)

    EDIT: you will need to use semicolons ( ; ) instead of commas ( , ) in the formula

    You need to select any of the cells C5 to C8, then click on Conditional Formatting | Manage Rules, then select that rule and click on Edit Rule, and then you can change the existing formula and OK your way out. Do you need to use the Swedish word for AND ?

    ... We normally share our files colleagues in Asia and back and forth.

    Is there any general CF rule that we can use so we doesn't this kind of error as give us a a lot confusion ...
    Do your colleagues in Asia change the names of the month to suit their location? I checked on Google translate and the Swedish word for month also begins with an M, so your format string of "mmmm" should be okay. However, I don't know about Asia.

    EDIT: One possible way around this would be to use a cell (e.g. X1) to contain the format string, so that your CF formula would refer to $X$1 instead of "mmmm", and you would ensure that X1 contains mmmm and your Asian colleagues would put their format string in X1.

    Is your PC set up for Swedish or English? If Swedish, then I would not have thought that ... TEXT($C5,"mmmm") ... would have returned the English month names to compare with X7.

    Hope this helps.

    Pete
    Last edited by Pete_UK; 04-04-2019 at 10:36 AM.

  15. #15
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Conditional Formatting formula not working

    HI Pete,
    Please Login or Register  to view this content.
    Yes i have followed the CF | Manage Rules....it not allowing us to add the formula. Its give same error as i have attach above.
    Can you please add your formula in the our attach excel sheet. Let us check if that works for us when we open here. Thanks

    Attachment 618699

    Do your colleagues in Asia change the names of the month to suit their location?
    No i don't think they change any thing, but there computer is in English and Yes my PC set up for Swedish.. I have tired different ways to enter the formula but no luck.

    Best,

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

    Re: Conditional Formatting formula not working

    Check my edits - use semicolons instead of commas:

    =AND($C5<>"";TEXT($C5;"mmmm")<>$X$7)

    Hope this helps.

    Pete

  17. #17
    Forum Contributor
    Join Date
    06-09-2014
    Location
    Sweden
    Posts
    311

    Re: Conditional Formatting formula not working

    Quote Originally Posted by Pete_UK View Post
    Check my edits - use semicolons instead of commas:

    Hope this helps. Pete
    Hi Peter,
    Thank you its all fix now appreciated your time and effort. Thread marked as Solved and Reputation has added

    Have great weekend

    Best,

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

    Re: Conditional Formatting formula not working

    Thanks for that - glad you got it working in the end.

    Pete

  19. #19
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional Formatting formula not working

    I spend a day travelling and find the problem has been solved when I next check-in - I'm glad the rest of the community was able to help.

+ 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. And formula not working with conditional formatting
    By reasemorin in forum Excel General
    Replies: 7
    Last Post: 11-29-2018, 10:09 PM
  2. [SOLVED] Conditional Formatting formula not working
    By panama74 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-12-2018, 05:19 PM
  3. [SOLVED] Conditional Formatting Not Working With Formula
    By markd038 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-28-2014, 04:05 AM
  4. Conditional Formatting Formula Not Working Properly
    By Oscar Martin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-23-2014, 08:59 AM
  5. AND in Conditional Formatting Formula not working
    By readyemail in forum Excel General
    Replies: 11
    Last Post: 11-30-2010, 06:00 PM
  6. using a formula in conditional formatting not working
    By missmischa in forum Excel General
    Replies: 4
    Last Post: 02-22-2010, 06:04 PM
  7. Conditional Formatting with LARGE formula not working
    By peri1224 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-02-2010, 09:47 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