Excel IF statement with multiple AND/OR conditions, nested IF formulas, and more

In Part 1 of our Excel IF function tutorial, we started to learn the nuts and bolts of the Excel IF function. As you remember, we discussed a few IF formulas for numbers, dates and text values as well as how to write an IF statement for blank and non-blank cells.

However, for powerful data analysis, you may often need to evaluate multiple conditions at a time, meaning you have to construct more sophisticated logical tests using multiple IF functions in one formula. The formula examples that follow below will show you how to do this correctly. You will also learn how to use Excel IF in array formulas and learn the basics of the IFEFFOR and IFNA functions.

How to use Excel IF function with multiple conditions

In summary, there can be 2 basic types of multiple conditions - with AND and OR logic. Consequently, your IF function should embed an AND or OR function in the logical test, respectively.

  • AND function. If your logical test contains the AND function, Microsoft Excel returns TRUE if all the conditions are met; otherwise it returns FALSE.
  • OR function. In case you use the OR function in the logical test, Excel returns TRUE if any of the conditions is met; FALSE otherwise.

To better illustrate the point, let's have a look at a few IF examples with multiple conditions.

Example 1. Using IF & AND function in Excel

Suppose, you have a table with the results of two exam scores. The first score, stored in column C, must be equal to or greater than 20. The second score, listed in column D, must be equal to or exceed 30. Only when both of the above conditions are met, a student passes the final exam.

The easiest way to make a proper formula is to write down the condition first, and then incorporate it in the logical_test argument of your IF function:

Condition: AND(B2>=20, C2>=30)

IF/AND formula:

=IF((AND(C2>=20, D2>=30)), "Pass", "Fail")

Easy, isn't it? The formula tells Excel to return "Pass" if a value in column C >=20 AND a value in column D >=30. Otherwise, the formula returns "Fail". The screenshot below proves that our Excel IF /AND function is correct:
Excel IF function with multiple AND conditions

Note. Microsoft Excel checks all conditions in the AND function, even if one of the already tested conditions evaluates to FALSE. Such behavior is a bit unusual since in most of programming languages, subsequent conditions are not tested if any of the previous tests has returned FALSE.

In practice, a seemingly correct IF / AND formula may result in an error because of this specificity. For example, the below formula will return "Divide by Zero Error" (#DIV/0!) if cell A2 is equal to 0:

=IF(AND(A2<>0,(1/A2)>0.5),"Good", "Bad")

The avoid this, you should use a nested IF function:

=IF(A2<>0, IF((1/A2)>0.5, "Good", "Bad"), "Bad")

Example 2. Using IF with OR function in Excel

You use the combination of IF & OR functions in a similar way. The difference from the IF / AND formula discussed above is that Excel returns TRUE if at least one of the specified conditions is met.

So, if we modify the above formula in the following way:

=IF((OR(C2>=20, D2>=30)), "Pass", "Fail")

Column E will have the "Pass" mark if either the first score is equal to or greater than 20 OR the second score is equal to or greater than 30.

As you see in the screenshot below, our students have a better chance to pass the final exam with such conditions (Scott being particularly unlucky failing by just 1 point : )
An example of IF/OR formula

More formula examples can be found in Excel IF OR functon.

Example 3. Using IF with AND & OR functions

In case you have to evaluate your data based on several sets of multiple conditions, you will have to employ both AND & OR functions at a time.

In the above table, suppose you have the following criteria to evaluate the students' success:

  • Condition 1: column C>=20 and column D>=25
  • Condition 2: column C>=15 and column D>=20

If either of the above conditions is met, the final exam is deemed passed, otherwise - failed.

The formula might seem tricky, but in a moment, you will see that it is not! You just have to express two conditions as AND statements and enclose them in the OR function since you do not require both conditions to be met, either will suffice:

OR(AND(C2>=20, D2>=25), AND(C2>=15, D2>=20)

Finally, use the above OR function as the logical test in the IF function and supply value_if_true and value_if_false arguments. As the result, you will get the following IF formula with multiple AND / OR conditions:

=IF(OR(AND(C2>=20, D2>=25), AND(C2>=15, D2>=20)), "Pass", "Fail")

The screenshot below indicates that we've got the formula right:
Using IF with OR & AND functions

Naturally, you are not limited to using only two AND/OR functions in your Excel IF formulas. You can use as many logical functions as your business logic requires, provided that:

  • In Excel 2016, 2013, 2010 and 2007, your formula includes no more than 255 arguments, and the total length of the formula does not exceed 8,192 characters.
  • In Excel 2003 and lower, you can use up to 30 arguments and the total length of your formula shall not exceed 1,024 characters.

Using multiple IF statements in Excel (nested IF functions)

If you need to create more elaborate logical tests for your data, you can include additional IF statements in the value_if_true and value_if_false arguments of your Excel IF formulas. These multiple IF functions are called nested IF functions and they may prove particularly useful if you want your formula to return 3 or more different results.

Here's a typical example: suppose you want not simply to qualify the students' results as Pass/Fail, but define the total score as "Good", "Satisfactory" and "Poor". For instance:

  • Good: 60 or more (>=60)
  • Satisfactory: between 40 and 60 (>40 and <60)
  • Poor: 40 or less (<=40)

To begin with, you can add an additional column (E) with the following formula that sums numbers in columns C and D:


An additional column that sums numbers in columns C and D

And now, let's write a nested IF function based on the above conditions. It's considered a good practice to start with the most important condition and make your functions as simple as possible. Our Excel nested IF formula is as follows:

=IF(E2>=60, "Good", IF(E2>40, "Satisfactory", "Poor "))

As you see, just one nested IF function is sufficient in this case. Naturally, you can nest more IF functions if you want to. For example:

=IF(E2>=70, "Excellent", IF(E2>=60, "Good", IF(E2>40, "Satisfactory", "Poor ")))

The above formula adds one more conditions - the total score of 70 points and more is qualified as "Excellent".

An example of nested IF functions

For more information about Excel IF with multiple conditions, please see How to use nested IF in Excel.

Using Excel IF in array formulas

Like other Excel functions, IF can be used in array formulas. You may need such a formula if you want to evaluate every element of the array when the IF statement is carried out.

For example, the following array SUM/IF formula demonstrates how you can sum cells in the specified range based on a certain condition rather than add up the actual values:


The formula assigns a certain number of "points" to each value in column B - if a value is equal to or less than 1, it equates to 1 point; and 2 points are assigned to each value greater than 1. And then, the SUM function adds up the resulting 1's and 2's, as shown in the screenshot below.
Using Excel IF in array formulas

Note. Since this is an array formula, remember to press Ctrl + Shift + Enter to enter it correctly.

Using IF function together with other Excel functions

Earlier in this tutorial, we've discussed a few IF formula examples demonstrating how to use the Excel IF function with logical functions AND and OR. Now, let's see what other Excel functions can be used with IF and what benefits this gives to you.

Example 1. Using IF with SUM, AVERAGE, MIN and MAX functions

When discussing nested IF functions, we wrote the formula that returns different ranking (Excellent, Good, Satisfactory or Poor) based on the total score of each student. As you remember, we added a new column with the formula that calculates the total of scores in columns C and D.

But what if your table has a predefined structure that does not allow any modifications? In this case, instead of adding a helper column, you could add values directly in your If formula, like this:

=IF((C2+D2)>=60, "Good", IF((C2+D2)=>40, "Satisfactory", "Poor "))

Okay, but what if your table contains a lot of individual scores, say 5 different columns or more? Summing so many figures directly in the IF formula would make it enormously big. An alternative is embedding the SUM function in the IF's logical test, like this:

=IF(SUM(C2:F2)>=120, "Good", IF(SUM(C2:F2)>=90, "Satisfactory", "Poor "))

Using IF with the SUM function

In a similar fashion, you can use other Excel functions in the logical test of your IF formulas:


=IF(AVERAGE(C2:F2)>=30,"Good",IF(AVERAGE(C2:F2)>=25,"Satisfactory","Poor "))

The formulas retunes "Good" if the average score in columns C:F is equal to or greater than 30, "Satisfactory" if the average score is between 29 and 25 inclusive, and "Poor" if less than 25.


To find the highest and lowest scores, you can use the MAX and MIN functions, respectively. Assuming that column F is the total score column, the below formulas work a treat:

MAX: =IF(F2=MAX($F$2:$F$10), "Best result", "")

MIN: =IF(F2=MIN($F$2:$F$10), "Worst result", "")

If you'd rather have both the Min and Max results in the same column, you can nest one of the above functions in the other, for example:

=IF(F2=MAX($F$2:$F$10) ,"Best result", IF(F2=MIN($F$2:$F$10), "Worst result", ""))

Using IF with the MIN and MAX functions

In a similar manner, you can use the IF function with your custom worksheet functions. For example, you can use it with the GetCellColor / GetCellFontColor functions to return different results based on a cell color.

In addition, Excel provides a number of special IF functions to analyze and calculate data based on different conditions.

For example, to count the occurrences of a text or numeric value based on a single or multiple conditions, you can use COUNTIF and COUNTIFS, respectively. To find out a sum of values based on the specified condition(s), use the SUMIF or SUMIFS functions. To calculate the average according to certain criteria, use AVERAGEIF or AVERAGEIFS.

For the detailed step-by-step formula examples, check out the following tutorials:

Example 2. IF with ISNUMBER and ISTEXT functions

You already know a way to spot blank and non-blank cells using the ISBLANK function. Microsoft Excel provides analogous functions to identify text and numeric values - ISTEXT and ISNUMBER, respectively.

Here's is example of the nested Excel IF function that returns "Text" if cell B1 contains any text value, "Number" if B1 contains a numeric value, and "Blank" if B1 is empty.

=IF(ISTEXT(B1), "Text", IF(ISNUMBER(B1), "Number", IF(ISBLANK(B1), "Blank", "")))

Using IF with ISNUMBER, ISTEXT and ISBLANK functions

Note. Please pay attention that the above formula displays "Number" for numeric values and dates. This is because Microsoft Excel stores dates as numbers, starting from January 1, 1900, which equates to 1.

Example 3. Using the result returned by IF in another Excel function

Sometimes, you can achieve the desired result by embedding the IF statement in some other Excel function, rather than using another function in a logical test.

Here's another way how you can use the CONCATINATE and IF functions together:

=CONCATENATE("You performed ", IF(C1>5,"fantastic!", "well"))

I believe you hardly need any explanation of what the formula does, especially looking at the screenshot below:
Using the result returned by IF in another Excel function

IF function vs. IFERROR and IFNA

Both of the functions, IFERROR and IFNA, are used to trap errors in Excel formulas and replace them with another calculation, predefined value or text message. In earlier Excel versions, you can use the IF ISERROR and IF ISNA combinations instead.

The difference is that IFERROR and ISERROR handle all possible Excel errors, including #VALUE!, #N/A, #NAME?, #REF!, #NUM!, #DIV/0!, and #NULL!. While IFNA and ISNA specialize solely in #N/A errors.

Here is the simplest example of the IFERROR formula:

=IFERROR(B2/C2, "Sorry, an error has occurred")

An example of using the IFERROR function in Excel

As you see in the screenshot above, column D displays the quotient of the division of a value in column B by a value in column C. You can also see two error messages in cells D2 and D5 because everyone knows that you cannot divide a number by zero.

In some cases, however, you may not want to trap all errors, but rather test the condition causing a specific error. For example, to replace a divide by zero error with your own message, use the following IF formula:

=IF(C2=0, "Sorry, an error has occurred", B2/C2)

And that's all I have to say about using the IF function in Excel. I thank you for reading and hope to see you on our blog next week!

You may also be interested in

3,253 responses to "Excel IF statement with multiple AND/OR conditions, nested IF formulas, and more"

  1. Andrew says:

    Hello! I need a formula to display a scholarship.

    These are the conditions:

    if final_grade < 8 print “No receive”;

    • if 8 ≤ final_grade < 9 print 300 ;

    • if 9 ≤ final_grade < 9,5 print 400 ;

    • if final_grade ≥ 9,5 print 600 .

    of course, I have a column where final grades are placed.

    I wish I was clear with my commnet... I can't wait for an answer!

    Thank you, All the best!

  2. ABAS KHAN says:

    i am using formula which is below mentioned but the result is for "yes" ok but for "#n/a" result is same #n/a but i need to show the result is "NO" which is base on formula.

    example: =IF(I1="#N/A","NO","YES")


  3. Dylan M Casey says:


    Could someone explain what is wrong with formula or if I'm using the wrong mechanism.

    This is the error I am receiving "Wrong number of arguments to IF. Expected between 2 and 3 arguments, but got 7 arguments."

    Any help is appreciated, thanks.

  4. Rajendra Swami says:

    I need a formula for below conditions (urgent required):

    01. if (a1 or b1 or c1 = "P", 1,0
    02. (i) IF(A1:C1)="P", "THREE",0 (three cells value are "P")

    (ii) IF (A1 AND B1="P" AND C1="") OR (A1 AND C1="P" AND B1="") OR (B1 AND C1="P" AND A1=""), "TWO",0
    (any two cells are "P" from three cell)

    (iii) IF (a1="p" and b1 or c1="") OR a1 and b1 ="" and c1="p") OR (a1 and c1="" and b1="p"), "ONE",0
    (only any one cell is "P" from three cells)

  5. Michael Solan says:

    Found really useful thank you!

  6. carla says:

    Please provide formula :
    IF B4=290,B4=2449,B4=250 C2="",C3+"", if True " Please provide this information" if False the data in E1.

  7. Dena Pinkman says:


    =IF (IC25>IA25, "URGENT", "OK")


  8. Bruna says:

    Hello! I'm trying to do a multiple conditional formula and I'm having trouble getting it to work...
    I'm trying to make something like this:
    If A is TRUE and B is TRUE, the formula should be something like AVERAGE(A;B)
    If A is TRUE and B is FALSE, then it should be =A
    If A is FALSE and B is TRUE, then it should be =B
    If A is FALSE and B is FALSE, =0
    I wanted to do it with multiple conditions, like A, B, C...
    How can I make it work? I tried everything I knew.

    • Hello!
      I hope you have studied the recommendations in the tutorial above. It contains answers to your question. Use a formula like this:


  9. Mike says:

    I hope someone could help me to condition, where I can have a column where it would either say “Complete” and “Incomplete” to reflect overall completion of requirements? The value is either Yes or No. If all answered 'YES' it will show "complete" and if any "No" answered "incomplete

  10. Nicholas O'Brien says:

    I have used the formula =IF(P2="V13-1X-BLU-1",N2+1457), so when the cell contains the text V13-1X-BLU-1 it adds 1457 days to the date (N2 contains date). Is it possible expand the formula to recognise more text (V9-2X-BLU-1) and make different additions (+804) ?

  11. Kyle says:

    Hi, I notice many IF scenarios above, but none that fit my scenario where I am also using a hyperlink. Any chance you can assist with the answer? Below is an example of what I am doing. The only thing I am trying to add is when D12 & D13 = other number combinations, I want that to reference a different hyperlink (image). Is it possible to add multiple IF's and hyperlink's in a single formula?

    =IF(AND(D12=2,D13=1),HYPERLINK("https://test1.jpg","View Layout"),"")

    I know this formula is wrong, but it depicts what I am trying to do with as many conditions as I need:

    =IF(AND(D12=2,D13=1),HYPERLINK("https://test1.jpg","View Layout"),IF(AND(D12=5,D13=2),HYPERLINK("https://test2.jpg","View Layout"),"")...so on and so on


    • Hello!
      If I understand your task correctly, the following formula should work for you:

      =HYPERLINK(IF(AND(D12=2,D13=1),"https://test1.jpg", IF(AND(D12=5,D13=2),"https://test2.jpg","")), IF(AND(D12=5,D13=2),"view2", IF(AND(D12=2,D13=1),"view1","")))

      You can learn more about HYPERLINK function in Excel in this article on our blog.

  12. Trisha says:

    What is the formula"if function" if you are getting the valedictorian, salutatorian in a class with the basis of ranking?

  13. James Hardin says:

    If age is between 18 and 56 and Sex is either "M" or "F", remark is "Qualified"

  14. suresh says:

    Related text need to display in 1st table from the 2nd table, If we write a remarks in the 2nd table following and related text in the 1st table -- can any one write the if formula for this

  15. Paul Fadden says:


    I'm trying to setup an if statement needing both the and & or functions.

    The OR statement is =IF(OR(Recruits="Yes",Refresh="Yes"),1,0)
    The AND statement will be if Eng = Yes, and IF(OR(Recruits="Yes",Refresh="Yes")

    I can get both to work individually, but not together, is this possible?

    I have created a matrix to see all possible outcomes, to test (Below)

    Eng Recruits Refresh
    Yes Yes Yes
    Yes Yes

  16. Nanita Mathew says:

    I want to color a cell based on whether it is a date or not. Eg:if A1 has a date, E1 should be green otherwise, no color.
    The closest I've got is using 'ISNUMBER' function. But this will color E1 even if I randomly put a number in A1.Is there anyway I can specify it to date?

  17. Tatyanah says:

    hello I need help here
    If column A2 is less or equal to 70 and the sum for cells D2:AA2 is 50 I want it to say "more effort Please" for else to leave it blank. I have tried this but it is not working
    IF((AND(A2<=70, SUM(D2:Aa2=50)), More effort please", " "))

  18. DAnna says:

    here is what I'm trying to solve:

    Cell could have the following data in it: apple, orange, grape, celery

    Looking for an IF statement that would drop into another cell either fruit or veggie.

    IF apple, orange, grape = fruit, if celery = veggie

    hope that makes sense. Thanks for your help.

  19. Linda says:


    I urgently need help here, how would I format:

    If A1 is yes then B1 cell is color green with text "YES" or if A1 is no then cell B1 is red with text "NO"
    Kind of like an attendance deal.

    Also is there a way to say: if any in A1-A10 is YES then cell A12 is color green (no text) but if there is any NO then A12 is color red (no text).

    I can't figure out the color element so I'd like to see both ways to see which one will be easier to implement.

    Thanks in advance!!

  20. RC says:

    Hi! I need help on this:
    this is for an exam..

    Correct answer: Good
    If your answer is "no good", "hold" or "for reworks" the result is STRICT.

    Correct answer: No good
    If your answer is "good", "hold" or "for reworks" the result is SWEET.

    Correct answer: "Hold"
    If your answer is "good" or "for reworks" the result is SWEET then STRICT if "no good".

    Correct answer is: For reworks
    If your answer is "good" the result is SWEET then STRICT if "no good" or "hold".

    Thank you!

  21. Usman Javed says:

    Hi Boss,

    Need your support to correct the formula for me.

    =if(RC[-5]=7,RC[-1]>"00<"07:01","Achieved","Not Acheived")

  22. Jen J says:


    Please help me in this IF function formula. So far I cannot get it work.

    IF A2=0% OR B2=0% OR C2=0% OR D2=0%, then F2 is equal to (A2+B2+C2+D2)/3,

    IF A2=0% AND B2=0%, then F2 is equal to (A2+B2+C2+D2)/2,

    IF B2=0% AND C2=0%, then F2 is equal to (A2+B2+C2+D2)/2,

    IF C2=0% AND D2=0%, then F2 is equal to (A2+B2+C2+D2)/2,

    IF A2=0% AND D2=0%, then F2 is equal to (A2+B2+C2+D2)/2,

    IF A2=0% AND B2=0% AND C2=0%, then F2 is equal to (A2+B2+C2+D2)/1,

    IF A2=0% AND B2=0% AND D2=0%, then F2 is equal to (A2+B2+C2+D2)/1,

    IF A2=0% AND C2=0% AND D2=0%, then F2 is equal to (A2+B2+C2+D2)/1,

    IF B2=0% AND C2=0% AND D2=0%, then F2 is equal to (A2+B2+C2+D2)/1,


  23. rom greg says:

    Is this formula correct? I need to find a value in another sheet
    =IF(MATCH(A1,Sheet1!A:A,0),"TAGAYTAY", IF(MATCH(A1,Sheet1!B:B,0), "DASMA", IF(MATCH(A1,Sheet1!C:C,0), "NAIC")))

  24. David Yurick says:

    How do you put multiple values from different sheets to return those values separated by commas into one cell?

    Sheet #1 is the Summary page with two columns: Column A: Names (A1: A28); Column B: (where I want to have all the attended conference names in the row w/ its respective name.)

    Sheet #2, #3, #4, etc are the conference sheets that contain a table with Column A: Names (A1: A28), and the Conference name in cell C6.

    What formula works to say, "If the name from Sheet #1 is listed in Sheet #2 (column A), then bring the conference name in cell C6 of that specific sheet, and add it to Sheet #1/Column B/row of that particular Name...and continue to concatenate all of these values into the same cell, separated by a comma.

    Thank you for your help.


  25. SHABIRI says:

    My name is shabir
    I'm looking for the formula that can count only 7 lowest grades out of range.
    Example there are 12 subjects which students should sit for in every term. So to rank their positions a teacher needs to pick only 7 out of 12 subjects of which a student has performed better. Regarding that A = 1, B= 2, C= 3, D=4, And F =5
    Please help

  26. Jo-Isabel Longoria says:

    Trying to figure out a formula. If "Exceeds" and High Potential" = 1 or "Meets" and High Potential" = 2 or "Low" and High Potential" = 3

  27. Shiva Kumari says:

    I have questions I have employees data I want to calculate commission according to their region wise give some conditions like in North region who r having above 5000 give 5% and 8000 to 10000 give 12% like that and same who r have south region above 5000 give 7% and 8000to 10000 give 12% like that I want how to write conditions in excel using formulas.

  28. Agilan says:

    I have 4 blank cells, every time I add a date in the 1st cell, a specific value should be returned, if not it should check the 2nd cell and if the 2nd cell has a date it should return another specific value and so on. I tried using the ISBLANK function but it does not work correct for me.

  29. Nate says:

    Hello Alexander,

    I'm afraid I have a similar problem to my previous SUMIF one further up the page, but with text instead.
    I'd like to count the number of cells that have specific text, but only if a cell on the same row also has specific text.

    In this case, I'd like to count the number of cells in column B that contain "Category M", but ONLY IF a cell in the same row in column G also contains "Yes". Is this clear enough?

    Because it's text, I suspect SUMIF won't be applicable here. Any help is appreciated.

  30. A Shanmugasundaram says:

    What is formulas for incentive calculation contains of this condition
    <26day up to 28days rs40perday and 26 days incentive is "0")

  31. Kimberly Johns says:

    I have been working on this for a while and I know I am trying to overcomplicate but I cannot get this formula to cover the one oddball instance.
    I have 3 columns B is my deal credit which will be either 50 for a split deal and 100 for a full deal. So if the deal is 50, the max amt to be paid is 100.00, if it is 100, the max paid is 200.00. Column C is the commission amt that has already been paid, so therefore if the deal is a split deal (50) and they have been paid 50.00, they are paid the difference which would be 50.00 which will go in column C. If the deal is a full deal (100) and the comm amt is 100.00 the amt paid would be 100.00 , the difference between the amt paid and the max amount.
    Here is my formula: =IF(C4>=200,0, IF(B4=50,100-C4, IF(B4=100,200-C4))) It seems to work for them all except the one oddball instance where my comm amt for a half deal is 109.10, so it is leaving my column C with a minus amount of -9.10 which I would like to show up as a 0.
    Thanks so much for your help. I hope I am not too confusing.

  32. Prahalad Kumawat says:

    Hello Expert,

    I need a formula with support following terms...

    if i press a digit between 0 to 5000 then we received result "1"
    5001 to 10000 = "2"
    10001 to 15000 = "3"

    200001 to 205000 = "41"
    2000001 to 2005000 = "401"

    5000 difference


    I need Solution of infinity

    kindly help

  33. shannmugasundaram says:

    working days lessthan 26day insentive value is "0"
    working days Morethan 26day to 27 days insentive value is "40" per day Total value (26*40=1040),(27*40=1080)
    working days Morethan 27day to 31 days insentive value is "40" per day Total value (28*60=1680),(29*60=1740),(30*60=1800) and (31*60=1860)
    I want Formula

  34. natalia says:

    I have a list of names and emails, i need to confirm with a yes or no if the person paid some fees

    im using this formula for the names in one cell:
    =IFNA(IF(VLOOKUP(A14,Table1[[#All],[Name of Person]],1,0)=A14,"yes","no"),"not found")

    and this one for the emails in another cell:
    =IFNA(IF(VLOOKUP(B14,Table1[Email],1,0)=B14,"yes","no"),"not found")

    how can i make it just one formula in one cell, instead of 2 formulas in 2 different cells?

    thank you so much!

  35. Moe says:

    Create a column called “Credit”. If the “Score” of the customer is “less than” 40, then give a “Poor” value in the Credit column. If the “Score” of the customer is “equal to” or “higher than” 40 but “equal to” or “less than” 70, then give an “OK” value. If the “Score” of the customer is “higher than” 70 but “less than” 90, then give a “Good” value. If the “Score” of the customer is “equal to” or “higher than” 90, then give an “Excellent” value. You must use a lookup function WITH an ARRAY Form for this column. Be sure that you implement the EXACT cutoff here using a range of scores with no more than 4 rows. No points will be given for using IF function.

  36. Usha says:


    Would like to calculate some valuse.

    Example day counts the person one who resolves the calls in counts per day ranges is like mentioned below

    1. 1 calls =Rs.75

    2. 2 calls=Rs.150

    3. >3 calls =Flat Rs.300

    Blanck should not consider.

  37. Allan says:


    I've tried the formula below however the forth IF doesn't give a logical answer. Would you please assist:


    G4 = years of seniority
    H4 = annual leave entitlement
    My objectif is to increase 2 days of leave entitlement every 5 years

  38. Mike Fiifi says:

    Hi, I am using a "if" and "and" combination but I'm not getting it right please help me with this.


    How do I correct the false section of this statement if there are options to choose from two alternatives for that

    • Mike Fiifi says:

      A1=4 B1=5
      A2=6 B2=0
      A3=0 B3=3

      So basically I want to find the averages of these two columns such that cells containing zeros are not ignored. For example the average for A1 and B1 is 4.5. Ideally the average of A2 and B2 will be 3 but I want Excel to write 6 instead and then 3 for A3 and B3 and not 1.5

    • Hello!
      If I understand your task correctly, the following formula should work for you:


  39. Shannon says:


    I'm trying to use the following formula for a commision function but I've obviously got something wrong. Can you please help me? Thanks so much!


  40. Kellsta says:

    I have a formula that I want to make more specific

    but I want to add for each item another set of criteria against cell F5 to check
    If u5= "overseas/ineligible" and F5= I then ignore, else check.
    If u5= "PRISONER" and F5= PR, then ignore, else check and so on for all the claim types.
    P5 still also needs to =4

  41. murugan says:

    Hey Hi,

    i have some doubts,

    if john and peter 2 peoples is available

    john is 10
    peter is 10

    if the name is john i need +2 for example 10+2 = 12
    if the name is peter i need +4 for example 10+4 = 14

    wherever i see john name is 12 instead of 10
    wherever i see peter name is 14 instead of 10

    i need to know the formula... please help me

  42. Betty R. says:

    I read through this article and came up with this for the project I'm working on. But it's not working. Please let me know what I need to do to fix this.

    =IF(AND($A2=”Conduct”,$F2="Final"), "Location 01", IF(AND($A2=”Development”,$F2="Final"), " Location 02", IF(AND($A2=”Development and Amendment”,$F2="Final"), " Location 03")))


  43. Lala says:


    I want to ask I need to sum A2 + B2 and the total in column C2 and if the total C2 is more than 100 it will display the balance in column D2.

  44. jasmeet says:

    Please help me finding the following:
    cell A2 contain6/2/21 7:14 PM
    If the value for A2 is between 7:30 PM to 10:30 PM and the day of the week is Tuesday, then the value should be a text "ABCZYZ"

    • Hello!
      If I understand your task correctly, the following formula should work for you:


      You can learn more about WEEKDAY function in Excel in this article on our blog.

      • jasmeet singh says:

        Hi Alexander,
        Thank you so much for the swift response.
        I need help with another formula. There are 2 sheets in excel:
        Sheet1 :
        Date start time End Time Analyst
        1/5/2021 7:30 13:30 ANALYST1
        1/5/2021 13:30 16:00 ANALYST2
        1/5/2021 16:00 18:30 ANALYST3
        1/5/2021 18:30 21:00 ANALYST4
        1/5/2021 21:00 0:00 ANALYST5
        1/5/2021 0:00 3:00 ANALYST6
        1/6/2021 7:30 13:30 ANALYST1
        1/6/2021 13:30 16:00 ANALYST2
        1/6/2021 16:00 18:30 ANALYST3
        1/6/2021 18:30 19:00 ANALYST4
        1/6/2021 21:00 0:00 ANALYST5
        1/6/2021 0:00 3:00 ANALYST6
        Sheet 2:
        1/5/21 5:32 AM
        1/5/21 3:39 PM
        1/5/21 3:45 PM
        1/5/21 7:05 PM
        1/5/21 8:51 PM
        1/5/21 10:47 PM
        1/5/21 12:57 AM
        1/6/21 5:05 PM
        1/6/21 7:53 PM
        1/6/21 9:13 PM
        1/6/21 11:50 PM
        1/6/21 5:53 PM
        1/6/21 11:36 PM
        1/6/21 6:11 PM
        1/6/21 6:15 PM
        1/6/21 7:03 PM
        1/6/21 7:03 PM
        1/6/21 7:03 PM
        1/6/21 7:03 PM

        I want a formula to find out the name of the analyst who is responsible as per sheet 2 data. For instance, 1/5/21 3:39 PM incident is for Analys2 or 1/6/21 9:13 PM should pull up Analyst 5. In other words, if the date in sheet 2 matches the date in sheet 1 then the time in sheet 2 for the same date should look up the value in start time and end time of sheet 1 and populate the value for the Analyst.

        Jasmeet Singh

        • Hello!
          The formula below will do the trick for you:

          =INDEX(D1:D12,MATCH(1,(INT(F1)=A1:A12)*(F1>A1:A12+B1:B12)*(F1Excel INDEX MATCH with multiple criteria
          I hope it’ll be helpful.

          • jasmeet singh says:

            Hi Alexander,
            Thank you so much for sharing the formula.
            I have tried but it is not giving me value as N/A. Can you please share the complete formula.
            This would be of a great help as I have some deliverables and need this urgent. This will be of a great great help.

            Jasmeet Singh

            • jasmeet singh says:

              Hi Alexander,
              Apologies to pester you.

              To add to this, the Sheet 2 has 2 columns not 1:
              Column1 : Date
              Colum 2 : time

              Jasmeet Singh

            • Hello!
              An NA error means that the required value was not found. The IFERROR function can be used.

              =IFERROR(INDEX(D1:D12,MATCH(1,(INT(F1)=A1:A12)*(F1>A1:A12+B1:B12)*(F1this article to learn how to use IFERROR in Excel.

              Also, note that the time interval is incorrect:
              1/5/2021 21:00 0:00
              00:00 is the beginning of the day. The interval from 21:00 to 00:00 is nonsensical. Use 21:00 23:59

              • jasmeet singh says:

                I have put all the values given above in one sheet from column A2 to F12 and applied the above given formula in G2, however no result is displayed. The column F contains both date and time, such as 1/5/21 5:32 AM. Please see the formula below:

                It only shows "REVIEW".

                Please help to fix this.

                Jasmeet Singh

              • Hi!
                The formula I sent to you was created based on the description you provided in your first request. However, as far as I can see from your second comment, your task is now different from the original one. Hence, the formula fails to work. I'm sorry for the wasted time. When I have more time, I will think of another formula.

  45. suli says:

    Can someone assist please?
    I have the following

    A1 = Yes
    B1 = a Date
    C1 = a string of 6 digit number with a letter

    I want D1 to have the Value "Fully Verified" if all three cells in the row are filled.
    If either B1 or C1 is blank, the return value in D1 to be "Not Verified"
    If both B1 and C1 are blank, the return value in D1 to be "Not Verified"

    What formula will suit this argument and how can that be arranged to give the desired return value?

    Thanks ...

  46. jasmeet singh says:

    Hi Alexander,
    Requesting you to please help me find the formula for the situation that we discussed the other day.
    Jasmeet Singh

  47. George Jembe says:

    Am developing an incentive and the entry level is 91 scoring 8% and the maximum is 253 scoring 15%. If one scores below 91 thats a zero and if they score more than 253 they earn 15%. What is the formula that will calculate anything between 91 and 253?

  48. ANKIT says:

    Hi Friends,

    pls can u help me to get the formula for example ive explained below

    if B2 cell value is greater than c2 cell value (good) or d2 cell value(very good) or e2 cell value (excellent)

    i want to get this good or very good or excellent comments in F2 cell

    • Hi!
      Please re-check the article above since it covers your case.

      • Ankit says:

        thx for ur reply, just chked it but my point is i want to take cell values dnt need have particular numbers,


        B3 cell value is 50, D3 cell value is 51, E3 cell value is 60 and F3 cell value is 61

        =CHOOSE((B3>=D3) + (B3>=E3) + (E3>=F3), "GOOD", "VERYGOOD", "EXCELLENT")

        So how to use cell value instead of any number

        • Hello!
          I’m not sure I got you right since the description you provided is not entirely clear. However, it seems to me that the formula below will work for you:

          =CHOOSE((B3>=D3) + (B3>=E3) + (F3>=F3), "","GOOD", "VERYGOOD", "EXCELLENT")

          If this is not what you need, explain what kind of result you would like to get in your example.

  49. nesreen says:

    i want to fill cell variable values from 1 to 9 according to the many conditions
    i used this formula but not reflect result

    • Hi!
      I am not sure I fully understand what you mean. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.

Post a comment

Thank you for your comment! When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to your query. We cannot guarantee that we will answer every question, but we'll do our best :)