+ Reply to Thread
Results 1 to 5 of 5

Incorrect formula + conditionnal formatting

  1. #1
    Registered User
    Join Date
    09-18-2019
    Location
    Morocco
    MS-Off Ver
    2013
    Posts
    5

    Incorrect formula + conditionnal formatting

    Hello Excel Community !

    I have an issue with my formula which doesn't show the correct status of the employee ( New; Active, Out) compared to the reporting period. I would like also that conditionnal formatting to be added by changing color depending on the status .I attached the file with clear examples.

    Thanks so much for you support ^^

    Best,
    Attached Files Attached Files
    Last edited by AliGW; 10-13-2020 at 08:40 AM. Reason: Irrelevant section of title removed - this is a help forum!!!

  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
    79,369

    Re: Incorrect formula + conditionnal formatting

    This returns TRUE:

    $C$2&$D$2>MONTH(C12)&YEAR(C12)

    That's why.

    Look at Evaluate Formula to see where your logic in creating the formula has failed.

    This has nothing to do with conditional formatting: please update your thread title to explain what you are trying to do.
    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
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,198

    Re: Incorrect formula + conditionnal formatting

    =IF(AND(DATE($D$2,$C$2,1)>=DATE(YEAR(C12),MONTH(C12),1),E12<>""),"Out",IF(DATE($D$2,$C$2,1)=DATE(YEAR(C12),MONTH(C12),1),"New","Active"))

    months and years as a text string will cause you problems as 1120 < 220 it is safer converting everything to dates

    is the above any closer

  4. #4
    Registered User
    Join Date
    09-18-2019
    Location
    Morocco
    MS-Off Ver
    2013
    Posts
    5

    Re: Incorrect formula + conditionnal formatting

    Thanks Ali for your tip ! Evaluate Formula feature helps a lot

  5. #5
    Registered User
    Join Date
    09-18-2019
    Location
    Morocco
    MS-Off Ver
    2013
    Posts
    5

    Re: Incorrect formula + conditionnal formatting

    Hello davsth ! Your formula works perfect and you're right about using Date function, I overlooked that !

    Thanks so much for the 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. [SOLVED] Need help with Conditionnal Formatting
    By philion_91 in forum Excel General
    Replies: 3
    Last Post: 08-19-2015, 01:04 PM
  2. [SOLVED] Conditionnal formatting with reference to an array
    By mvangeleyn in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-10-2015, 12:07 PM
  3. Table Formatting and Conditionnal formatting
    By bimo in forum Excel General
    Replies: 1
    Last Post: 01-15-2014, 06:45 AM
  4. Incorrect Formula - conditional formatting
    By mahowarth in forum Excel General
    Replies: 4
    Last Post: 09-10-2013, 08:27 PM
  5. [SOLVED] 1 question about conditionnal formatting
    By Askalian in forum Excel General
    Replies: 1
    Last Post: 05-14-2013, 05:30 PM
  6. Auto shape conditionnal formatting
    By Skell in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-21-2012, 01:45 PM
  7. Add value to conditionnal formatting
    By Paul in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2005, 04:05 PM

Tags for this Thread

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