Conversation Use IF statement in Excel with set of cells in Excel
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/486955#M29789
<P>Hi,</P><P>I need to use the if statement with set of cells, say C4:C33, and the return for TRUE condition is the same as cell value, while for false condition the return value is zero. The following is an explanation:</P><P> </P><P>=MIN(IF(C4:C33<C40,C4:C33,0))</P><P> </P><P>However, this form is giving invalid value because I am using the same set as a True result.</P><P>Anyone can give an idea how to do this please?</P><P> </P><P>Thanks</P>Fri, 26 Apr 2019 17:27:36 GMTm81hassan_512019-04-26T17:27:36ZUse IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/486955#M29789
<P>Hi,</P><P>I need to use the if statement with set of cells, say C4:C33, and the return for TRUE condition is the same as cell value, while for false condition the return value is zero. The following is an explanation:</P><P> </P><P>=MIN(IF(C4:C33<C40,C4:C33,0))</P><P> </P><P>However, this form is giving invalid value because I am using the same set as a True result.</P><P>Anyone can give an idea how to do this please?</P><P> </P><P>Thanks</P>Fri, 26 Apr 2019 17:27:36 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/486955#M29789m81hassan_512019-04-26T17:27:36ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487096#M29792
<P><LI-USER uid="328396"></LI-USER> </P><P>Maybe this?</P><PRE>=MINIFS(C4:C33,C4:C33,"<"&C40)</PRE><P> </P>Fri, 26 Apr 2019 17:49:48 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487096#M29792Detlef Lewin2019-04-26T17:49:48ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487248#M29794
Perhaps, this is what you need:<BR />=(MIN(C4:C$33)<C$40)*C4Fri, 26 Apr 2019 18:16:03 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487248#M29794Twifoo2019-04-26T18:16:03ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487377#M29795
<P>Thanks for your reply, What I exactly want, is that, if the value of specifc cell in column C is lower than the fixed value (placed in cell C40) the the output from If-statement is the same value of specific C-cell, else, the output value is zero. C40 is only used for condition/comparesion and not used as an output neither in True nor in false conditions.</P><P> </P><P>Thanks</P><P> </P>Fri, 26 Apr 2019 18:22:34 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487377#M29795m81hassan_512019-04-26T18:22:34ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487426#M29796
You need no MIN. Thus, what you need is:<BR />=(C4<C$40)*C4<BR />The above formula returns either C4 or 0.Fri, 26 Apr 2019 18:29:11 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487426#M29796Twifoo2019-04-26T18:29:11ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487452#M29797
What I need is to use a set of cells (C4:C22) instead of only one cell C4.<BR /><BR />The use of min function is to serve other purpose. The overall picture is that, I have a set of numbers which represent a test scores between 0 and 50. What I want to find is the highest score below the succeed point which is 25. For example, If I have the scores: 10,20,23,30,40,49; the value I need to find should be 23 in this example.<BR /><BR />Here, C40=Constant=25. ThanksFri, 26 Apr 2019 18:38:33 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487452#M29797m81hassan_512019-04-26T18:38:33ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487491#M29798
Your new logic is now entirely different from the old one. Can please provide a clear example of your data and desired result?Fri, 26 Apr 2019 18:44:40 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487491#M29798Twifoo2019-04-26T18:44:40ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487532#M29799
<P>Ok,</P><P>Lets us assume we have the following students scores:</P><P> </P><P>Student No. Score</P><P>------------- ----------</P><P> 1 41</P><P>2 20</P><P>3 23</P><P>4 27</P><P>5 30</P><P>6 10</P><P>7 49</P><P> </P><P>the test maximum possible score is 50. That is the minimum success degree that student need to take for passing the exam is 25.</P><P>I need to find thclosest student score to 25 for failed students (below 25).</P><P>In this above example, the required score will be 23 for student no. 3...</P><P>What I am doing is that storing the 23 in a specific cell, say cell C40. and the students score are along column C.</P><P>then, follow anyone of the following algorithms:</P><P> </P><P>1) find the minimum difference between C40-value and the student score which is bellow C40</P><P>2) find the maximum value of student score which is still bellow C40.</P><P> </P><P>Thanks a lot for your help</P><P> </P><P> </P>Fri, 26 Apr 2019 18:55:09 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487532#M29799m81hassan_512019-04-26T18:55:09ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487589#M29803
Please further expand your assumptions by filling in the results you want in Column D.Fri, 26 Apr 2019 19:07:33 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487589#M29803Twifoo2019-04-26T19:07:33ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487599#M29805
<P>Hi Twifoo: There is no column D, the following is what exactly happen:</P><P> </P><P>Student No. Score</P><P>------------- ----------</P><P>C1 = 41</P><P>C2 = 20</P><P>C3 = 23</P><P>C4 = 27</P><P>C5 = 30</P><P>C6 = 10</P><P>C7 = 49</P><P>.</P><P>.</P><P>.</P><P>C40 = 25</P><P> </P><P>C41 = closest score to C40 value and lower than C40 value.</P><P> This means, C41 cell have the formula I want to use to fulfill the required task.</P><P>In summary, there is a set of scores and I want to find the closest score to C40 value and lower than C40 value using one formula and store this value is cell C41.</P><P> </P><P>Thanks</P><P> </P>Fri, 26 Apr 2019 19:15:04 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487599#M29805m81hassan_512019-04-26T19:15:04ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487620#M29806
<P><LI-USER uid="328396"></LI-USER> </P><P>It seems the desired result is a secret.</P><P>One last guess:</P><PRE>=MAXIFS(C4:C33,C4:C33,"<"&C40)</PRE><P> </P>Fri, 26 Apr 2019 19:21:19 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487620#M29806Detlef Lewin2019-04-26T19:21:19ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487636#M29807
I am getting the following error with this gess: #NAME? ..<BR />This means that there is no such command in Excel.<BR />May you please double check the tool name?<BR />Fri, 26 Apr 2019 19:25:40 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487636#M29807m81hassan_512019-04-26T19:25:40ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487640#M29808
Similar to Detlefâ€™s formula, but backward-compatible:<BR />=MAX(INDEX((C4:C33<C40)*C4:C33,0))Fri, 26 Apr 2019 19:28:35 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487640#M29808Twifoo2019-04-26T19:28:35ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487664#M29809
This one is working, but it gives a wrong answer. Let me experiment with this formula, I think I will get something useful from it.<BR /><BR />Thank you very much TwifooFri, 26 Apr 2019 19:35:18 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487664#M29809m81hassan_512019-04-26T19:35:18ZRe: Use IF statement in Excel with set of cells
https://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487687#M29810
C4:33 refers to the range of scores. You may have to modify that range if it is different from the actual range where the scores are stored. Good luck!Fri, 26 Apr 2019 19:44:32 GMThttps://techcommunity.microsoft.com/t5/excel/use-if-statement-in-excel-with-set-of-cells/m-p/487687#M29810Twifoo2019-04-26T19:44:32Z