+ Reply to Thread
Results 1 to 9 of 9

Adding Criteria to Existing Formula

  1. #1
    Forum Contributor
    Join Date
    05-29-2017
    Location
    UK
    MS-Off Ver
    Pro Plus 2016
    Posts
    301

    Adding Criteria to Existing Formula

    Hi guys,

    What would we add to exiisting formula:

    =IF(COUNTA($C$60:$C$69)<>10,"-",COUNTIF($U$60:$U$69,"<"&EDATE(I590,1)))

    to ALSO say that return the results only if "y" is selected in $S$60:$S$69 otherwise if $S$60:$S$69 is "n" or blank, display "-"

    Thanking in advance!

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,480

    Re: Adding Criteria to Existing Formula

    This, maybe?

    =IF($C$60:$C$69<>"Y","-",IF(COUNTA($C$60:$C$69)<>10,"-",COUNTIF($U$60:$U$69,"<"&EDATE(I590,1))))
    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 Contributor
    Join Date
    05-29-2017
    Location
    UK
    MS-Off Ver
    Pro Plus 2016
    Posts
    301

    Re: Adding Criteria to Existing Formula

    Thanks for looking into it, AliGW!

    Nope, returns #VALUE error.

    And its $S$60:$S$69, not C

  4. #4
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,480

    Re: Adding Criteria to Existing Formula

    Attach a sample workbook - it'll save us playing guesswork ping-pong.

  5. #5
    Forum Contributor
    Join Date
    05-29-2017
    Location
    UK
    MS-Off Ver
    Pro Plus 2016
    Posts
    301

    Re: Adding Criteria to Existing Formula

    Attached here:

    https://www.excelforum.com/attachmen...1&d=1527960379

    Its a formula in I590 (marked red)
    Attached Files Attached Files

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,480

    Re: Adding Criteria to Existing Formula

    Try this:

    =IF(COUNTIF($S$60:$S$69,"y")=0,"-",IF(COUNTA($C$60:$C$69)<>10,"-",COUNTIF($U$60:$U$69,"<"&EDATE(I589,1))))

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,672

    Re: Adding Criteria to Existing Formula

    Try

    =IF($S$60:$S$69<>"Y","-",IF(COUNTA($C$60:$C$69)<>10,"-",COUNTIF($U$60:$U$69,"<"&EDATE(I589,1))))


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  8. #8
    Forum Contributor
    Join Date
    05-29-2017
    Location
    UK
    MS-Off Ver
    Pro Plus 2016
    Posts
    301

    Re: Adding Criteria to Existing Formula

    The one by AliGW works! Did not try one by John, but I'm sure its also good.

    Thank you guys!!!! Lots

  9. #9
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,480

    Re: Adding Criteria to Existing Formula

    You're welcome!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Adding Criteria to Existing Formula
    By vill in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-26-2017, 09:15 AM
  2. [SOLVED] Adding IF AND criteria to existing IF Statement
    By Webbers in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-04-2016, 02:52 PM
  3. Replies: 3
    Last Post: 01-13-2016, 12:05 PM
  4. Adding to an existing formula !!!!!!!!!
    By hlb129 in forum Excel General
    Replies: 3
    Last Post: 02-10-2015, 08:02 AM
  5. Replies: 7
    Last Post: 07-07-2014, 09:48 AM
  6. [SOLVED] Adding additional selection criteria to existing Macro
    By Mogpot1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2013, 10:29 AM
  7. Adding to 2 existing formula
    By cmackay1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2012, 05:14 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