+ Reply to Thread
Results 1 to 10 of 10

COUNTIF & conditional formatting

  1. #1
    Registered User
    Join Date
    09-27-2015
    Location
    BEIRUT
    MS-Off Ver
    2016
    Posts
    77

    COUNTIF & conditional formatting

    Hello,
    please I need your help.

    1) cell B1 only count cells AG5:AG12 that equals 14 if cells from B5:AF5 contains letter Y or Z or T or S.

    2) highlight (conditional formatting) cells from B5:AF5 if it contains Y or Z or T or S and cells AG5:AG12 equals 14 and the same for other rows.

    Thank you
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-08-2009
    Location
    Vancouver,Canada
    MS-Off Ver
    O365
    Posts
    13

    Re: plz help in countif & conditional formating

    1. Conditional formatting in B5:AF5
    select B5:AF5, conditional formatting, formula ,
    =AND(B5<>"",ISNUMBER(FIND(B5,"YZTS")))
    2. Formula in B1

    B1=SUMPRODUCT((AG5:AG12=14)*(B5:AF12<>"")*ISNUMBER(FIND(B5:AF12,"YZTS"))*1)

  3. #3
    Registered User
    Join Date
    09-27-2015
    Location
    BEIRUT
    MS-Off Ver
    2016
    Posts
    77

    Re: COUNTIF & conditional formatting

    Hello cabcyvr,
    thx for your help

    number 2 worked after I modified it to be:
    =SUMPRODUCT((AG5:AG12>=14)*(B5:AF12<>"")
    *ISNUMBER(FIND(B5:AF12;"Y;Z;T;S"))*1)


    but number 1 didn't work
    because it keep highlighted
    not only when it contain 14
    and if there is a way to highlight
    cells from B5:AF5

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,620

    Re: COUNTIF & conditional formatting

    Please paste the following formula into cell AH5 and copy down: =AND(AG5=14;SUMPRODUCT(COUNTIFS(B5:AF5,{"y";"z";"t";"s"})))+0
    Please paste the formula into cell B1: =SUM(AH5:AH12)
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    09-27-2015
    Location
    BEIRUT
    MS-Off Ver
    2016
    Posts
    77

    Re: COUNTIF & conditional formatting

    Hello,
    thanks for your help
    sorry it didn't work
    maybe its impossible or i have something wrong.

  6. #6
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,418

    Re: COUNTIF & conditional formatting

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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.

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,620

    Re: COUNTIF & conditional formatting

    Here is the file with the formulas applied.
    Let us know if you have any questions.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-27-2015
    Location
    BEIRUT
    MS-Off Ver
    2016
    Posts
    77

    Re: COUNTIF & conditional formatting

    Hello AliGW,
    i have attached the workbook in my main post #1
    thank you for help.

  9. #9
    Registered User
    Join Date
    09-27-2015
    Location
    BEIRUT
    MS-Off Ver
    2016
    Posts
    77

    Re: COUNTIF & conditional formatting

    Thanks for everyone helped me
    i have solved my problem.
    Attached Files Attached Files
    Last edited by MOUNIR75; 04-06-2024 at 08:40 AM.

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,620

    Re: COUNTIF & conditional formatting

    Thank You for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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 / COUNTIF
    By nelley in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-06-2019, 03:40 PM
  2. [SOLVED] Conditional formatting with countif
    By bryden2008 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-03-2017, 11:42 AM
  3. countif conditional formatting while ignoring n/a
    By lynnell4246 in forum Excel General
    Replies: 3
    Last Post: 05-14-2010, 05:48 PM
  4. [SOLVED] Countif and conditional formatting
    By SLKPM in forum Excel General
    Replies: 0
    Last Post: 09-30-2005, 06:05 AM
  5. Conditional Formatting And Countif
    By cafe in forum Excel General
    Replies: 6
    Last Post: 08-10-2005, 03:40 PM
  6. Countif with conditional formatting
    By Johnny in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2005, 08:06 AM
  7. Countif and Conditional Formatting
    By Ramiro Espinoza in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-02-2005, 02:06 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