+ Reply to Thread
Results 1 to 47 of 47

5 Criterias in 1 Formula

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

    5 Criterias in 1 Formula

    Hi guys,

    Don't know if its even fair to be asking help on this one, as its a formula to possibly challenge even strongest Excel expert... Surely not something I can crack up on my own... in any case, giving it a try, but would perfectly understand if this one is beyond our limits.

    In a nutshell, there is a need to come up with ONE single formula for 5 different criteria (which are basically 5 different formulas to fit in 1) If possible, without helper columns/rows, arrays, macros etc.

    Additional details are that this formula is to be used as a part of 0 to 10 rating system, where one final number (0 to 10) needs to return average based on 5 different criterias. Again, if possible, without additional columns/rows etc (file already contains lots of data, so if any additional stuff could be avoided, that would be best)

    There is no need to try changing how sheets, or data etc are structured (can't change it in original copies anyway), but literally all is required is to just write a single formula which will have all 5 criterias/formulas blended in it.

    Attaching actual Excel file with full details, and a screenshot below.

    If possible to take a look, any feedback, questions or suggestions are welcome. Thanking (lots) in advance.

    https://www.excelforum.com/attachmen...1&d=1509199831 [EXCEL]

    2017-10-28_1655.png
    Attached Files Attached Files

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    If possible, without helper columns/rows, arrays ...
    ROFL! Not a prayer ...

    However, I will have a look.
    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 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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Well, I've had a look, and I can't really see what the problem is here. All you do is this:

    =Iferror((formula_1+formula_2+formula_3+formula_4+formula_5)/5,0)

    where formula_1 is replaced by MIN(((COUNTIF(Sheet1!C4:C7,">0")+(COUNTIF(Sheet1!C10:C13,">0")+(COUNTIF(Sheet1!C16:C19,">0")))))) and so on.

    Now, are you really wanting to know how to create formulae 3 and 4?
    Last edited by AliGW; 10-28-2017 at 10:30 AM.

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    For criterion 3:

    =LOOKUP(Sheet1!E10,{0,0.51,1.01,2.01,3.01,4.01,5.01},{0,1,2,4,6,8,10})

    Can't do criterion 4 as there is nothing in the cells on Sheet 1 that you are telling us to reference ...

  5. #5
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Here you go:

    =IFERROR((MIN(((COUNTIF(Sheet1!C4:C7,">0")+(COUNTIF(Sheet1!C10:C13,">0")+(COUNTIF(Sheet1!C16:C19,">0"))))))+IF(Sheet1!E5="-",0,IF(Sheet1!E5="YES",10,IF(Sheet1!E5="NO",0)))+LOOKUP(Sheet1!E10,{0,0.51,1.01,2.01,3.01,4.01,5.01},{0,1,2,4,6,8,10})+I6+IF(Sheet1!E20="-","-",IF(Sheet1!E20="YES",10,IF(Sheet1!E20="NO",0))))/5,0)

    You just need to sort out criterion 4 (I6 in this formula).

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: 5 Criterias in 1 Formula

    I agree with AliGW that #4 doesn't fit with what you have given. See my partial answer in the attached.

    5 criteries in 1 formula (1).xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,427

    Re: 5 Criterias in 1 Formula

    Yep. that's it Criterion 4 makes no sense as written...Also what if G3 = J3???
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  8. #8
    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,522

    Re: 5 Criterias in 1 Formula

    Criteria for Criterion 4 needs reviewing as you refer to cells G3,J3 and J3 on Sheet1 but data is in ROW 15 ????

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

    Re: 5 Criterias in 1 Formula

    Reviewing all suggested now... thank you guys.

    As for Criteria #4 what we asking there to do is:

    (1st to note: all balances in this file are for a month April (marked in red))

    1. Check if April balance is less than January. If it is, means your Net Work is lower than at year start. Count 0 points
    2. Check if April balance is more than January. If it is, means your Net Work is higher than at year start. AND if April balance is lower than previous month we still give it 5 points
    3. Check if April balance is more than January AND more than previous month. If it is, means your Net Work is higher than at year start AND its increasing on monthly basis. Count 10 points
    Last edited by vill; 10-28-2017 at 10:51 AM.

  10. #10
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    OK - here you are:

    =IFERROR((MIN(((COUNTIF(Sheet1!C4:C7,">0")+(COUNTIF(Sheet1!C10:C13,">0")+(COUNTIF(Sheet1!C16:C19,">0"))))))+IF(Sheet1!E5="-",0,IF(Sheet1!E5="YES",10,IF(Sheet1!E5="NO",0)))+LOOKUP(Sheet1!E10,{0,0.51,1.01,2.01,3.01,4.01,5.01},{0,1,2,4,6,8,10})+IF(Sheet1!H15 < Sheet1!E15,0,IF(AND(Sheet1!H15 > Sheet1!E15,Sheet1!H15 > Sheet1!G15),10,5))+IF(Sheet1!E20="-",0,IF(Sheet1!E20="YES",10,IF(Sheet1!E20="NO",0))))/5,0)

    I have a funny feeling about how this thread is likely to pan out, though ...

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

    Re: 5 Criterias in 1 Formula

    YES, to

    @Today, 09:36 AM #8 JohnTopley !

    I moved the Criteria 4 box in the end, to make Sheet1 look more neater, and missed on updating already typed in details in Sheet2!

    Sorry, yes, referring to Sheet1 E15:H15 here...

  12. #12
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    See post #10.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,427

    Re: 5 Criterias in 1 Formula

    And come June.. will you be wanting to compare June with Jan and June with May and will June's value be in I15... or somewhere else??

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

    Re: 5 Criterias in 1 Formula

    Looking at formula in post #10 now, thanks AliGW! Got 8.2 returned, where based on my manual calculations it should have been 8.4... so now checking out the details...

    @ Glenn Kennedy - since its a number to be generated only for April, we only look into Jan (year start) + Apr (current) + Mar (previous) Same formula will be used for following/previous months

    Diving into studying given suggestions further...

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

    Re: 5 Criterias in 1 Formula

    PS: wondering on "I have a funny feeling about how this thread is likely to pan out, though ..." or how it could pan out? :-)

  16. #16
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Yes, the result is different, I realise that, but the principle of building the formula is sound.

  17. #17
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Quote Originally Posted by vill View Post
    PS: wondering on "I have a funny feeling about how this thread is likely to pan out, though ..." or how it could pan out? :-)
    If I'm proved right, I'll let you know ...

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

    Re: 5 Criterias in 1 Formula

    Ok, so I explored the formula suggested by AliGW, and it seems to be a perfect one! It should return correct values too, based on what I see is entered there. Yet...

    WHY do I get a final numer 8.2, while it should be 8.4? Just cant get my head around it...

    Here is manual calculation:

    Criteria #1 has 3 streams = 4 pts
    Criteria #2 says 'YES" = 10 pts
    Criteria #3 says 4.5 = 8 pts
    Criteria #4, Apr balance is higher than Jan AND higher than Mar = 10 pts
    Criteria #5 says "YES" = 10 pts

    Totals: 4 + 10 + 8 + 10 + 10 = 42

    42 / 5 = 8.4

    So how is it 8.2 that is returned by, what it looks like, a perfect formula?? Just doesn't make any sense...

    Do you also get 8.2 as a final number, AliGW?

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

    Re: 5 Criterias in 1 Formula

    I have just claimed 8.4 pts by adding another Income Stream in Criteria #1, but this (after adding another stream of income) now should have been displaying 8.8...

  20. #20
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Yes. Here's the reason - your opening formula (criterion 1) returns 3.

    Totals: 3 + 10 + 8 + 10 + 10 = 41

    41/5 = 8.2

    So you need to rethink your first formula if you want it to return 4.
    Last edited by AliGW; 10-28-2017 at 11:29 AM.

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

    Re: 5 Criterias in 1 Formula

    Ah yeah! That's a buggar...

    You're right, AliGW, the formula for Criteria #1 needs to be different... The:

    MIN(((COUNTIF(Sheet1!C4:C7,">0")+(COUNTIF(Sheet1!C10:C13,">0")+(COUNTIF(Sheet1!C16:C19,">0"))

    was there to only share as an example what is used for counting Streams of Sources, and why same format needs to remain (as per comment in yellow bow, Excel file) BUT this formula does not give points as specified in Criteria #1, Sheet2!...

    So to finalise the final one, there seems this first formula would be the only one to be updated... Truthfully, no ideas how? So it makes a COUNT only from Cells specified (not from entire column) AND it returns points, as per guides in Sheet2! ?

  22. #22
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    OK - just talk us through the steps that would return 4 here, please, to ensure we are making the right suggestion.

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

    Re: 5 Criterias in 1 Formula

    I dont understand the 'how' but generally all it should say:

    IF

    MIN(((COUNTIF(Sheet1!C4:C7,">0")+(COUNTIF(Sheet1!C10:C13,">0")+(COUNTIF(Sheet1!C16:C19,">0"))

    = 0, then count 0 pts
    = 1, then count 1 pts
    = 2 then count 2 pts
    = 3 then count 4 pts
    = 4 then count 6 pts
    = 5 then count 8 pts
    >5 then count 10pts

  24. #24
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Why do you need MIN?

    Try this:

    =LOOKUP(SUM(COUNTIF(Sheet1!C4:C7,">"&0),(COUNTIF(Sheet1!C10:C13,">"&0),(COUNTIF(Sheet1!C16:C19,">"&0)),{0,1,2,3,4,5,6},{0,1,2,4,6,8,10})
    Last edited by AliGW; 10-28-2017 at 11:44 AM.

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

    Re: 5 Criterias in 1 Formula

    And then the points returned from this formula would just blend into points returned by formulas for other criterias, to then divide all returned by 5 = 8.4 (as per initially entered data)

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

    Re: 5 Criterias in 1 Formula

    MIN is there for a reason, I think would take long to explain... but needs to stay. Do you want me to go into details?

  27. #27
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Yes, please. If I ask a question, it's for a reason, and I cannot see that it does anything at all in that formula*. Have a look at my suggestion above.

    * It does nothing at all.
    Last edited by AliGW; 10-28-2017 at 11:48 AM.

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

    Re: 5 Criterias in 1 Formula

    Ok!

    Basically original formula was:

    =((COUNTIF(C4:C7,">0")+(COUNTIF(C10:C13,">0")+(COUNTIF(C16:C19,">0")/F4)*10))/F4)*10

    The problem with it, however, was that should CountedIF total values are greater than value entered in F4, it returns a number greater than 10. This is not allowed in 0 to 10 rating system, and max number returned should never exceed 10.

    So a suggestion was made to use MIN, as this way MIN would pick up a lower number and always show a lower number. Bearing in mind that number entered in F4 would never be greater than 10, this version worked well. Until I bumped into a current situation...

    Give me a moment, I might gonna be able to dig out original file, explaining full details on this initial issue...

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

    Re: 5 Criterias in 1 Formula


  30. #30
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    OK, but in the formula I have, the MIN function does nothing. Look at this example:

    =2+3+4 = 9

    =MIN(2+3+4) = 9

    The answer will be the same, so I would suggest that you are using the MIN function incorrectly.

    Have you tried my suggestion yet?

  31. #31
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    In your other attached file you would need this to make the MIN function work:

    =MIN(10,((COUNTIF(C4:C7,">0")+(COUNTIF(C10:C13,">0")+(COUNTIF(C16:C19,">0")/F4)*10))/F4)*10)

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

    Re: 5 Criterias in 1 Formula

    It could be that I was using it incorrectly! Would not be surprised :-)

    Tried fitting in your above suggested:

    LOOKUP(SUM(COUNTIF(Sheet1!C4:C7,">"&0),(COUNTIF(Sheet1!C10:C13,">"&0),(COUNTIF(Sheet1!C16:C19,">"&0)),{0,1,2,3,4,5,6},{0,1,2,4,6,8,10})


    into...

    =IFERROR((MIN(((COUNTIF(Sheet1!C4:C7,">0")+(COUNTIF(Sheet1!C10:C13,">0")+(COUNTIF(Sheet1!C16:C19,">0"))))))+IF(Sheet1!E5="-",0,IF(Sheet1!E5="YES",10,IF(Sheet1!E5="NO",0)))+LOOKUP(Sheet1!E10,{0,0.51,1.01,2.01,3.01,4.01,5.01},{0,1,2,4,6,8,10})+IF(Sheet1!H15 < Sheet1!E15,0,IF(AND(Sheet1!H15 > Sheet1!E15,Sheet1!H15 > Sheet1!G15),10,5))+IF(Sheet1!E20="-",0,IF(Sheet1!E20="YES",10,IF(Sheet1!E20="NO",0))))/5,0)

    I'm sure its brackets somewhere, but taking time keep trying and trying, with same error messages popping up... How exactly does it fit in there, please?

  33. #33
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Here you go:

    =IFERROR(LOOKUP(SUM(COUNTIF(Sheet1!C4:C7,">"&0),(COUNTIF(Sheet1!C10:C13,">"&0),(COUNTIF(Sheet1!C16:C19,">"&0)),{0,1,2,3,4,5,6},{0,1,2,4,6,8,10})+IF(Sheet1!E5="-",0,IF(Sheet1!E5="YES",10,IF(Sheet1!E5="NO",0)))+LOOKUP(Sheet1!E10,{0,0.51,1.01,2.01,3.01,4.01,5.01},{0,1,2,4,6,8,10})+IF(Sheet1!H15 < Sheet1!E15,0,IF(AND(Sheet1!H15 > Sheet1!E15,Sheet1!H15 > Sheet1!G15),10,5))+IF(Sheet1!E20="-",0,IF(Sheet1!E20="YES",10,IF(Sheet1!E20="NO",0))))/5,0)

    Yes, you are using MIN incorrectly. See post #31.

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

    Re: 5 Criterias in 1 Formula

    Hmm. I get error 'There is a problem with this formula' ?

  35. #35
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Mmm - there's a problem. Give me a few moments.

  36. #36
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Right - I need you to do what I asked in post #22, please. Explain EXACTLY the maths that comes up with a result before you convert to points using this:

    = 0, then count 0 pts
    = 1, then count 1 pts
    = 2 then count 2 pts
    = 3 then count 4 pts
    = 4 then count 6 pts
    = 5 then count 8 pts
    >5 then count 10pts

    Use the data in your example sheet from post #1.

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

    Re: 5 Criterias in 1 Formula

    Ok! Give me a moment to get all details organised

  38. #38
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Thanks.

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

    Re: 5 Criterias in 1 Formula

    So, what we want for Criteria #1 is:

    1. Look in Sheet1! C4:C7, C10:C13, C16:C19 and count how many times there are balances entered there

    (this is needed to find out how many Streams of Income occurred during that particular month)

    2. Return points based on number of counts, where IF:

    = 0 streams, then count 0 pts
    = 1 streams, then count 1 pts
    = 2 streams, then count 2 pts
    = 3 streams, then count 4 pts
    = 4 streams, then count 6 pts
    = 5 streams, then count 8 pts
    >5 streams, then count 10pts

    (this is needed to find out how stable is your current financial situation. 0 pts = Poor, 10 pts = Excellent)

    These would be the only 2 conditions.

    I'm guessing what's throwing us around is that MIN thing... which is no longer relative for this formula purposes. I kept that original formula in Sheet2! J3 as an example, just be sure that we only count balances from specified cells (C4:C7, C10:C13, C16:C19) and not from entire column.

  40. #40
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Right. Please try this:

    =IFERROR((LOOKUP(SUM(COUNTIF(Sheet1!C4:C7,">"&0),COUNTIF(Sheet1!C10:C13,">"&0),COUNTIF(Sheet1!C16:C19,">"&0)),{0,1,2,3,4,5,6},{0,1,2,4,6,8,10})+IF(Sheet1!E5="-",0,IF(Sheet1!E5="YES",10,IF(Sheet1!E5="NO",0)))+LOOKUP(Sheet1!E10,{0,0.51,1.01,2.01,3.01,4.01,5.01},{0,1,2,4,6,8,10})+IF(Sheet1!H15 < Sheet1!E15,0,IF(AND(Sheet1!H15 > Sheet1!E15,Sheet1!H15 > Sheet1!G15),10,5))+IF(Sheet1!E20="-",0,IF(Sheet1!E20="YES",10,IF(Sheet1!E20="NO",0))))/5,0)

  41. #41
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Here's your file - see cell N15.
    Attached Files Attached Files

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

    Re: 5 Criterias in 1 Formula

    Blind me... after all... was sweating on this one!

    AliGW, guys... I need to let you know, you've been tremendous help to me, and surely to many others. Even though you might not be looking for material rewards from a help that you're giving us, I keep wishing that I would be in a position to give something back in return, for everything you do. If there is anything, let me know?

    Little more than a year I didn't even know how to add charts into Excel. Currently working my butt (we can say, from a garage) on building a complete life management system, starting in Excel. I don't know where would I be, if not because of you... I do believe (in fact, I know) that one day all the hard work that is currently being put into this venture, will be rewarded. I hope you won't mind me reaching out back to each of you, when that time comes, and sharing what we managed to build, together.

    In a mean time, I'm thanking you, from my heart, for all of your help. Makes me emotional just by trying to explain in words, how happy I am to be a part of this community, and grateful for... you. And everything you do. To me, us, and to the world.

    THANK YOU.

    AliGW, and everyone else who looked into this one as well - thank you...

  43. #43
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    You are most 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.

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

    Re: 5 Criterias in 1 Formula

    Yes, solved... thank you :-)

  45. #45
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: 5 Criterias in 1 Formula

    Hey Ali and vill,

    There is a lot of Min(Countif...>0) discussion here. I thought that Count() only counted cells that had numbers in them. If you did a Count(Range1,Range2,Range3) it might do the same thing as you were trying to accomplish.
    https://www.microsofttraining.net/fg...-in-excel.html

  46. #46
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,681

    Re: 5 Criterias in 1 Formula

    Yes, Marvin, you are most likely right, but we were essentially sticking together pre-existent formulae. They could no doubt be streamlined.

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

    Re: 5 Criterias in 1 Formula

    Hey Marvin, thanks for looking into it.

    I'm sure that formulas could be improved, only at this moment of time not looking for perfection, rather just to get working. Task -> formula -> correct results = happy... there is all what's needed, at this stage :-)

+ 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] Macro Find set criterias to a colomn of number, delete the rows that don't meet criterias
    By TAMMY32 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-03-2017, 04:09 PM
  2. Sum.IF formula with criterias ;)
    By concepo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-20-2016, 04:24 PM
  3. [SOLVED] Help with two Criterias Formula
    By odoualex in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-12-2015, 10:22 AM
  4. One Formula Searching for 2 Criterias
    By juicypeanut in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-10-2015, 12:54 AM
  5. Formula with two/three criterias
    By angie.chang in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-28-2012, 05:02 AM
  6. IF and MAX in one formula but two criterias
    By Enviro1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-04-2006, 10:59 AM

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