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 formula =IF(AND(A2<>0,(1/A2)>0.5),"Good", "Bad") will return "Divide by Zero Error" (#DIV/0!) if cell A2 is equal to 0. 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: =C2+D2

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:

=SUM(IF(B1:B5<=1,1,2))

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 and AVERAGE:

=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.

IF and MAX/MIN:

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:

2,007 Responses to "Excel IF statement with multiple AND/OR conditions, nested IF formulas, and more"

  1. TLane says:

    I am trying to do a formula:

    Column j minus column L but only if there is a value in L if there is no value then it equals 0.

  2. Jgrey01 says:

    I need a formula that essentially says the following:
    if a2 is " a" and b2 is "no" c2 is 1
    if a2 is "a" and b2 is "yes" c2 is 2
    if a2 is "b" and b2 is "no" c2 is 3
    if a2 is "b" and b2 is "yes" c2 is 4
    I tried if(or(and) but I can only get two results with that formula. Can someone help?

    • imafoneman says:

      =IF((AND(A2="A",B2="NO")),1,IF((AND(A2="A",B2="YES")),2,IF((AND(A2="B",B2="NO")),3,IF((AND(A2="B",B2="YES")),4,0))))

    • Jan says:

      =IF(A2="a", IF(B2="no",1,2), IF(A2="b", IF(B2="no",3,4)))

    • Divya says:

      Should be typed in C2
      =IF(OR(AND(A2=a,B2=no)),"1",IF(OR(AND(A2=a,B2=yes)),"2",IF(OR(AND(A2=b,B2=no),"3",IF(OR(AND(A2=b,B2=yes)),"4"))))

    • Hello,
      If we understand your task correctly, you need to create a few helper columns:
      - Column G: G1 - "a", G2 - "a", G3 - "b", G4 - "b"
      - Column H: H1 - "no", H2 - "no", H3 - "yes"
      - Column I: I1 – 1, I2 – 2, I3 – 3, I4 – 3

      Then enter the following array function into C1:

      =INDEX($I$2:$I$5, MATCH(A2&B2, $G$2:$G$5&$H$2, $H$5, 0))

      Press Ctrl + Shift + Enter for this array function to work and copy this formula down the column. Hope this solution will work for you.

    • Jon says:

      Sir, Please write this formula in C2.

      =IF(AND(A2="A",B2="NO"),1,IF(AND (A2="A",B2="YES"),2,IF(AND(A2="B",B2="NO"),3,IF(AND (A2="B",B2="YES"),4,""))))

  3. Adrian says:

    Help with a formula please:
    If A1<=4 and B1 <=2 then C1 is G
    If A1 =1 and B1 =3 Then C1 is G
    If A1 =5 and B1 =1 Then C1 is A
    If A1 =3,4 and B1 =2 Then C1 is A
    If A1 =2,3 and B1 =3 Then C1 is A
    If A1 =1,2 and B1 =4 Then C1 is A
    If A1 =5 and B1 =2 Then C1 is HA
    If A1 =4 and B1 =3 Then C1 is HA
    If A1 =3 and B1 =4 Then C1 is HA
    If A1 =1,2 and B1 =5 Then C1 is HA
    If A1 =5 and B1 =3 Then C1 is R
    If A1 =4 and B1 =4 Then C1 is R
    If A1 =3 and B1 =5 Then C1 is R
    Many thanks.

    • Hello Adrian,
      First, write down your conditions in different columns:
      – Column G: G1 - 4, G2 - 1, G3 - 5, G4 – 3, etc.
      – Column H: H1 - 2, H2 - 3, H3 – 1, etc.
      – Column I: I1 - "G", I2 - "G", I3 - "A"

      Then paste the array function below in C1:

      =IFERROR(INDEX($I$1:$I$17, MATCH(A1&B1, $G$1:$G$17&$H$1:$H$17, 0)), "")

      Press Ctrl + Shift + Enter for this array function to work and copy this formula down the column. Hope this is exactly what you need. :)

  4. Yonatan says:

    is something wrong with this formula?
    =IF(AND(D3=$A$17, B3=$D$15), $B$17, IF(D3=$A$18, IF(OR(B3=$D$20, G3>$U$18), $B$18,IF(D3=$A$16, IF(AND(MONTH(E3)=$T$18, B3=$D$20), $B$16, $B$19)))))
    instead of showing the right output(percentage), it just says "false", the first 3 if work though.
    Thanks

  5. Oji says:

    please can you help me the formula to this question
    Currently, customers are responsible for paying the shipping costs. The sales team suggests that customers really dislike paying shipping costs, and that offering “free shipping” instead of the 1% discount would likely increase sales. Create a formula for the “Sales with Free Shipping” column that subtracts the “Shipping Cost” from the “Sales” only if the “Expanded Order Type” is Extra Large, XX Large, or XXX Large. Copy the formula down to all the rows. What would total 2012 sales have been if the company had offered free shipping instead of the 1% discount.

    Order ID Order Date Order Priority Order Quantity Order Type Expanded Order Type Sales Discount Sales with Discount Sales with Free Shipping Ship Mode Shipping Cost
    51648 1/1/2012 Low 45 Large XX Large 2354.8 0.01 2331.252 Regular Air 19.99
    51648 1/1/2012 Low 50 Large XXX Large 187.88 0.01 186.0012 Regular Air 2.97
    29030 1/2/2012 Medium 10 Small Extra Small 192.58 0 192.58 Regular Air 4.1
    54214 1/2/2012 Medium 38 Large Extra Large 7325.63 0.01 7252.3737 Express Air 24.49
    47591 1/2/2012 Critical 27 Medium Medium-Large 279.4 0 279.4 Regular Air 6.91
    43494 1/3/2012 Medium 2 Small Mini 3668.28 0 3668.28 Regular Air 13.99
    10945 1/3/2012 Medium 14 Small Small 1170.025 0 1170.025 Regular Air 8.99
    35811 1/3/2012 Critical 6 Small Extra Small 10.39 0 10.39 Regular Air 0.7
    16164 1/3/2012 Low 26 Medium Medium-Large 2354.15 0 2354.15 Delivery Truck 14
    16164 1/3/2012 Low 26 Medium Medium-Large 69.38 0 69.38 Regular Air 4.28
    50471 1/3/2012 Low 25 Medium Medium 5859.25 0 5859.25 Delivery Truck 28.16
    35811 1/3/2012 Critical 49 Large XXX Large 741.57 0.01 734.1543 Regular Air 1.39
    16164 1/3/2012 Low 22 Medium Medium 3353.54 0 3353.54 Regular Air 19.99
    31555 1/4/2012 Critical 5 Small Mini 500.5 0 500.5 Delivery Truck 28
    55011 1/4/2012 Critical 48 Large XXX Large 452.28 0.01 447.7572 Regular Air 4.82
    7107 1/4/2012 Not Specified 3 Small Mini 172.04 0 172.04 Regular Air 11.1
    44646 1/4/2012 Low 47 Large XXX Large 12723.95 0.01 12596.7105 Regular Air 35
    7107 1/4/2012 Not Specified 3 Small Mini 113.14 0 113.14 Regular Air 5.08

  6. Katy says:

    Hello, I need help. I have a range of numbers and looking for If formula which can classify into Over 90 days;
    Over 60 days;
    Over 42 days;
    Below 42 days.
    Please, can you help me with it?

  7. Kate says:

    IF(AND(B43>0,B4320833,B4333332,B4366667,B43166667,B43666667),(((B43-666667)*0.35)+200833.33))

  8. Jones says:

    Hello,
    I wish to develop a model in excel that provides information on expected loan repayment from clients on a monthly basis so I can easily match with payments received at the end of the month. If the model can also prompt me on the expected repayments for each date that will be mostly appreciated. It will help me reduce my loan delinquency and default.

  9. Venkatraman B says:

    Basic chart
    Person Product Quantity Person Product Quantity
    ABC Orange 200 GHI Banana Formula to get quantity from basic chart
    ABC Banana 500
    DEF Mango 400
    GHI Banana 800
    GHI Mango 200

  10. B.Venkatraman says:

    Basic chart Final chat
    Person Product Quantiy Person Product Quantiy
    A Pen 200 C Rubber Forumula to get quantiy from basic chart
    A Rubber 500
    B Pen 400
    C Pen 800
    C Rubber 200

    • Adrian says:

      You'll need a few formulas

      =SUMIF(B1:B10,"PEN",C1:C10)
      Formula above sums the values in C1:C10 for the cells in B1:B10 that has "PEN" in it.
      Copy the formula for other products you have.
      =SUMIF(B1:B10,"XXXX",C1:C10)**change the XXXX into the product name**

  11. syed says:

    Hi Tried the formula for the time wise but im getting an error for it

    =IF(AND(Al2>07:00:00,Al2=08:00:00,A1=09:00:00,A1=10:00:00,Al2<=11:00:00),"10am-11am",0))))

  12. C.James says:

    Hello!
    Hopefully a simple one.

    If (A)-(B)=>0(C) - Ongoing(D)
    If (A)-(B)=0(C) - Filled(D)
    If (C) is blank - Not Active

  13. Ash says:

    Can someone help me with the following logical statement:
    IF
    "TIMEIN PV"<"TIMEIN DH" AND "TIME IN DH"<"TIMEOUT PV"<"TIMEOUT DH"
    OR
    "TIMEIN DH"<"TIMEIN PV"<"TIMEOUT DH"
    OR
    "TIMEIN DH"<"TIMEIN PV""TIMEOUT DH",
    ALERT,
    0)
    The TIMEIN or TIMEOUT (DH or PV) are formatted in 24:00 hours. I want to create an alert when two schedules are clashing like this:
    PV (Private) (in)xxxxxxxxx(out) (in)xxxxxxxxxxxx(out) (in)xxxxxxxxx(out)
    DH (Dayhab) in ================================================= out

    • Hello Ash,

      Thank you for your comment. As far as I can see, there is a symbol missing in the last part of your formula - "TIMEIN DH"< "TIMEIN PV"”TIMEOUT DH”. Once you add the necessary logical operator (>,<,<>,=) there, it should work. I hope this will help you.

  14. Robo says:

    Hi, If 1=500 & 2-700. Want to put this formula.
    Can u please help me?

  15. Jack la Grange says:

    Hi I have 2 questions.
    I need to write 2 if arguments
    if a2 - ba = >300 then subtract 300, maximum 600 then subtract (a2-b2)-300 answer maximum 300 if not return 0
    Question 2
    How to embed formulas so excel can be saved and reused without formulas disappearing even if operators mistakenly enter numbers in formula cells
    Thank you very much

  16. Ali Padda says:

    Hi dear
    Can you please let me know how to extract data from a row while comparing multiple sheets' data under some condition in new work sheet?
    For example; I want to make a list of top 10 students from multiple sheets and the entire data against these students must be on a single new sheet.
    Can you guide please!
    Profound regards

  17. Richard L Gardner says:

    =IF(V2=-2,"C","L"),IF(AND,V2>-3,"E")

    THIS DOES NOT WORK. NEED TO SHOW C IF 0,-1,-2,L IF GREATER THAN 0 AND E IF -3

  18. Vishal says:

    can i get formula for this

    • If the industry focus is less than 5 and number of solutions is more than 10 – 100%
    • If the industry focus is more than 5 and number of solutions is less than 10 – 80%
    • If the industry focus is more than 5 and number of solutions is more than 10 – 60%
    • If the industry focus is less than 5 and number of solutions is less than 10 – 40%
    • If no data or no information – 20%

  19. David Harris says:

    Hello

    I would like to understand how I can create the following formula within excel;
    Column A - Has 3 different values (action 1, action 2, and action 3)
    Column B - Arrival Time
    Column C - Departure Time
    Column D - I need to find the difference in departure time (column C) & arrival time (Column B) of Action 1 (as recorded in column A). However all other times will comeback as 0 (or null figure) as I do not want this to be seen in future analysis

    (Column E) - I need to find the difference in departure time (column C) & arrival time (Column B) of Action 2 (as recorded in column A). However all other times will comeback as 0 (or null figure) as I do not want this to be seen in future analysis

    (Column F) - I need to find the difference in departure time (column C) & arrival time (Column B) of Action 3 (as recorded in column A). However all other times will comeback as 0 (or null figure) as I do not want this to be seen in future analysis

    PLEASE HELP :-)

  20. Timothy Wells says:

    Identify tickets that do or don't meet the defined service resolution target.

    LOW TICKETS Resolved within 336 hours (10 Days)
    MEDIUM TICKETS Resolved within 168 hours (5 Days)
    HIGH TICKETS Resolved within 4 hours
    CRITICAL TICKETS Resolved within 4 hours

    =IF ((H2=LOW, F<336, "YES", "NO"))
    ((H2=MEDIUM, F<168, "YES", "NO"))
    ((H2=HIGH, F<4, "YES", "NO"))
    ((H2=CRITICAL, F<4, "YES", "NO"))

    I need help in creating one formula that reviews text within cell H2, and then uses the hours the ticket was opened located within F2 and compare it to the given formula based on the ticket priority.

  21. Madhavan says:

    Hi
    what is the formula if my condition is
    A=1 ,B=2 the output should be c=1.
    If A=2,B=3 the output should be c=1
    the output should change only if the A= multiples of 1 & B = Multiples of 2 otherwise it will be a least matching.

  22. Saroj kumar tiwari says:

    If there is two dates in a1 and b1
    C1 is 0 to 3 months
    D1 is 3 to 6 months
    E1 is 6 to 12 months
    F1 is 0 to 1 year
    Please suggest formula

  23. James Eddins says:

    I think I just found heaven!

  24. Saroj kumar tiwari says:

    If there is two dates in a1 and b1
    If 0 to 3 months, c1 is yes
    If 3 to 6 months, d1 is yes
    If 6 to 12 months, e1 is yes
    If 0 to 1 year, f1 is yes
    Please suggest formula

  25. Arif says:

    1. i like to minus Coulmn 1 (1st ship date) to column 2 (2nd ship date) & out come should be in number
    2. after that i like to find the max value number in the column.

  26. ashwani kumar says:

    help me to calcute my commission my commission is .5% but condition is minimum 2 rs and maximum 12 rs

  27. syed Ahmad says:

    there are so many man or women then how can i find man with help of if formula please let me know

  28. J says:

    Hi,
    I weekly table set up and I want to track if someone does a certain task for consecutive days. What would I use to give 4 points if they did it 4 consecutive days and NOT just for 4 days during that specified time frame? Thank you

  29. Ralph says:

    Looking for help with: ie. if d43 - 3.75 is <= 0 then equal blank if not then equal d43 - 3.75

  30. U T says:

    Mam kindly give formula to calculate pass or fail for 6 subjects in which marks of 4 subjects is more than 40 and subjects are present in different cell such as a2, e2, j2 , l2, m2 and p2.

  31. Ali says:

    Hi,
    I want to calculate the sum of the cells if in column B have text "paid" then calculate values from Column A in respective cell and if Column B have text "Un-Paid" then the values from Column A will not calculated... reference list is below...

    Rs 3,000.00 Paid
    Rs 30.00 Paid
    Rs 50.00 Paid
    Rs 5,000.00 Paid
    Rs 10,000.00 Un-Paid
    Rs 10,000.00 Un-Paid
    Rs 5,000.00 Un-Paid
    Rs 330.00 Un-Paid
    Rs 650.00 Paid
    Rs 785.00 Un-Paid

    Looking forward for prompt response please...

    Thanks

    • Adrian says:

      If you want something simple you can have another column that determines if column b says paid.

      =IF(B1="PAID",A1,0) - this goes in column c
      Sum values in column c.

  32. Trudie says:

    Hiya,

    Trying to create a formula that I can then conditional format based on the result.

    Basically:
    If >75% of of a column say Yes in a different worksheet, I want it to return a value of Green
    If 25-75% of a column say Yes in a different worksheet, I want it to return a value of Amber
    If <25% of a column say Yes in a different worksheet, I would like it to return a value of Red

    Then I will conditional format these so we can see at a glance how much has been received (I know how to do this so can do this bit).
    Thank you in advance for your help.

    Trudie

  33. Ashis says:

    Need to calculate accrual / accumulated leave for current year . Please guide with the “ If condition” :
    Sick Leave Prev. Yr Bal. = X
    Sick Leave Alloted Current Yr. =Y
    Capping for Sick Leave =Z
    Below Z to be considered on actual & Above Z will lapse.
    Anyone please help.!!!

  34. WICKLYFE says:

    I need a formular that will either give me
    1)Lost Customer
    2)New Customer
    3)Down-Trders
    4)Up_traders
    Have tried below but it is not working our
    Please help

    =IF(D53<1;"Lost Customer";IF(E53D53;"Downtrader";"Uptrader")))

  35. Taaliba says:

    Morning
    can you please assist in calculating a if then formula in excel 2016.
    I am trying to say if D48+D49>=C40 then D50=E40, if D50 is less than C40 then keep the sum of D48+D49 in cell D50

  36. Simon says:

    I'm trying to use a nested IF function using specific ranges of dates but I can't get it to display each answer separately in the same column. For example, I want to display "30 Days" if the condition cell has a date within 30 days out from today, "60 Days" if the date is within 30 and 60 days out, and so on... This is what I have:
    =IF(H15-TODAY()>=30,"30 Day",IF(H15-TODAY()>=60,"60 Day",IF(H15-TODAY()>=90,"90 Day",IF(H15-TODAY()>=180,"6 Mo",IF(H15-TODAY()>=270,"9 Mo","12 Mo")))))

  37. Boy says:

    Column A is lates
    Column B is minutes of lates
    If Lates is 1 and minutes is less than 15, Warning
    If Lates is 1 and minutes are more than 15, 50%
    If Lates are 2, 50%
    If Lates are 3 or more, 100%

  38. Boy says:

    Tried this formula for the above but it is not working. Can someone please check? Thank you.

  39. Boy says:

    =IF(A1=0,0,IF(AND(A1=1, B1=3,1)

  40. TOM says:

    HI
    QUESTION.. IS THERE AN EASIER WAY THAN: =IFS(AG21=0,"+3",AG21=+1,"+3",AG21=+2,"+3",AG21=+3,"+3",AG21=+4,"+3",AG21=+5,"+3",AG21=+6,"+3",AG21=+7,"+3",AG21=+8,"+3",AG21=+9,"+3",AG21=+10)
    THANKS FOR YOUR HELP

  41. ola says:

    IF(A3=70,A3=75,A3=85,A3=95,"C3*2"))

    can someone correct this formula for me

  42. faizam says:

    what is the formula if one column contains text and we want to copy that in next column and below it until another word appears in the some column within excel?
    E.g
    1- Next Company Model Management

    2- NO TOYS DE

    3- Nur Management

    Above data needs to be converted into folowing in next coloumn:

    Next Company Model Management
    Next Company Model Management
    Next Company Model Management
    Next Company Model Management
    Next Company Model Management
    Next Company Model Management
    NO TOYS DE
    NO TOYS DE
    NO TOYS DE

    Nur Management
    Nur Management
    Nur Management
    Nur Management

  43. Sanjay Hirani says:

    Anyone Help For below mention Problem

    I have This 3 Same Am mount but percentage is different different,
    500 70%
    500 80%
    500 90%
    now what i want i am trying to fix formula in next coalum
    Target % Result
    500 70% 0 if % below 70 % amount should be 0
    500 80% 300 if % between 80 to 85 Result come Automatic 60% From target
    500 85% 800 if % between 85 to 90 Result come Automatic 80% From target
    500 90% 500 if % Above 90 Result come Automatic 100% From target

  44. Berenice says:

    Hello-

    I am trying to add additional data to an existing If Is formula:

    =IF(@O:O<=-3,"25% DISCOUNT - PCS OVER",IF(@P:P<=-3,"25% DISCOUNT - PCS SHORT"," "))

    I would like to add the Number (value) of pcs into the formula. The numbers are in columns O (over) and P (short). How would I do this?

  45. Leryma Varus says:

    I recieve False when I entered this function help pls
    If(B3>=10,IF((OR(C3>=10,D3>=10)),"PASSED","FAILED"))

  46. Trevor says:

    Hi, I have a question if that's okay. I have three adjacent columns with values, lets say for the sake of argument A1,B1&C1, some of which have values in A, some of which have values in C, and all of which have values in B.
    A basic formula for my purpose, if there's a value in column A, would be something along the lines of:
    =IF(A1"",CONCATENATE(A1,B1,C1))
    However, here's where it gets tricky, as I'd only wish it to concatenate A1,B1,C1 if there's also a value in C1. Otherwise I'd like it to return a value of A1. Similarly if there's a value in C1, but not in A1, I'd like it to return a Value of C1.
    I've managed in the past to concatenate A1,B1 or return a blank value if there's no value in A1, but what I can't seem to do is return A1 rather than concatenate all three cells if there's no value in C1.
    Many thanks for any help anyone can offer in this matter. As a more concrete means of expressing it, let's say that A1 = Dog, B1 = -, C1 = Cat. The result of the formula would be to read Dog - Cat, with or without the space between the hyphens.
    However, if A2 = Dog, B2 = -, C2 is blank, the result of the formula would be Dog.
    And if A3 is blank, B3 = -, C3 = Cat the result of the formula would be Cat.
    Best, Trevor

  47. Trevor says:

    Sorry, the above should have read adjacent columns A,B,C not A1,B1&C1 and the basic concatenate formula without the additional conditions is actually
    =IF(A1"",CONCATENATE(A1,B1,C1))not A1"",CONCATENATE(A1,B1,C1)) as above.
    Thanks again, Trevor

  48. Trevor says:

    Just realised that when posting it seems to be stripping the greater and less than symbols from my formula above which should be immediately after A1. Not sure why but I'll give it another go here just to see if I was really remiss and forgot to include them in my original emails. So far I've tried the formula below, hopefully the greater and less than symbols after A1 will be apparent as I've typed them in this time rather than pasted them, but this returns A1,B1 not just A1. And I haven't even got to the C1 part of the equation yet!
    =IF(A1"",CONCATENATE(A1,B1,C1),IF(C1="",A1))
    Best, Trevor

  49. Trevor says:

    Hi all again,
    Just to say I resolved it with the following, you have to imagine that it reads =IF(AND(A1lessthangreaterthan"", etc. as it'll probably strip the signs out again.
    =IF(AND(A1"",C1""),CONCATENATE(A1,B1,C1),IF(AND(A1="",C1""),C1,A1))
    Best, Trevor

  50. Pam says:

    Hi,

    Hoping to get some help with a formula. Currently I have this formula:
    =IF(AND(DL3>=0, DL3=4.1, DL3=4.26), 2, FALSE)))
    I also want to add another condition: If 5 or more cells in a range are blank then return "2"
    Can this be added to this formula? Or how would you write that?
    Here is the range of cells E3:BF3

  51. Pam says:

    Hi,

    Hoping to get some help with a formula. Currently I have this formula:
    =IF(AND(DL3>=0, DL3=4.1, DL3=4.26), 2, FALSE)))
    I also want to add another condition: If 5 or more cells in a range are blank then return "2"
    Can this be added to this formula? Or how would you write that?
    Here is the range of cells E3:BF3

  52. Nuriya says:

    Hi,
    Is there any formula for: if the text(Name) comes 2 times in a column take the text to a specific cell if the text(Name) comes 3 times in the column take the text to another cell?

  53. Ali says:

    Very very Thanks

  54. Sady says:

    Hello
    I would like some help with adjusting this formula:
    =IF(ISERROR(AVERAGE(G3,K3,N3,Z3,AF3,AO3,AT3,BD3,BF3)),"", IF(DO3<2,AVERAGE(G3,K3,N3,Z3,AF3,AO3,AT3,BD3,BF3), "Invalid"))
    I would like the average of the scores above to be calculated based on two conditions.
    BOTH DL=1 and DO<2. If both of these conditions are not met then it should read "invalid"
    Is this possible? is there another way to write this? (I have included the ISError as I do not want blank cells to produce errors)

  55. Jessica says:

    I need a formula to do the following;

    If "X" is present in A1 - A10 & "Y" is present in B1-B10 (in the same row) what is C1-C10 in the same row.

    eg. A2=X & B2=Y what is C2

    Can you please help?

  56. speed says:

    I need a formula to do the following:
    There is a list of cells in column B. If column B contain text ending with "hba0" or "P0",
    Indicate SW1 on column A, next to the row cell in column B. If column B contain text ending with "hba1" or "P1", Indicate SW2 on column A, next to the row cell in column B.
    Also to ignore blank or empty cell for the list in column B, thanks.

  57. Ted says:

    I need a formula that will return the following:
    8 or lower = Pre Contemplation
    8-11 = Contemplation
    12-14 = Preparation
    14 and above = Maintenance

    I have a running total cell that will give me the number. Based upon the result of that cell I need it to return the text that corresponds. The below examples shows the column B totaled then averaged. The average equates to 12 therefore based upon the above table should return "Preparation"

    Column A. Column B
    1 2
    2 4
    3 6
    4 Total 12
    5 Preparation

    Thank you!

  58. Sabir K.P says:

    My policy is to give Incentive based on year of service of my staffs. For example: I would like to give Rs. 750/- to those staffs who have year of service between 1 & 3 years and Rs. 1,000/- to those staffs having service above 3 years. In addition, if they achieve a Per Vehicle Incentive of > Rs. 500/- only they will be eligible for the above mentioned Incentive. Will u please help me to resolve this?

Post a comment



Unfortunately, due to the volume of comments received we cannot guarantee that we will be able to give you a timely response. When posting a question, please be very clear and concise. We thank you for understanding!
60+ professional tools for Excel
60+ professional tools for Excel
2019–2007 to do your daily work
Incredible product, even better tech support…AbleBits totally delivers!
Deborah Bryant
Anyone who works with Excel is sure to find their work made easier
Jackie Lee
The best spent money on software I've ever spent!
Patrick Raugh
Ablebits is a fantastic product - easy to use and so efficient.
Debra Celmer
Excel is at its best now
Annie C.
I don't know how to thank you enough for your Excel add-ins
Jennifer Morningstar
Anybody who experiences it, is bound to love it!
Kumar Nepa
AbleBits suite has really helped me when I was in a crunch!
Nelda Fink
I have enjoyed every bit of it and time am using it
Christian Onyekachi Nwosu
It's the best $100 we've ever spent!
Mike Cavanagh
I love the program, and I can't imagine using Excel without it!
Robert Madsen
One word… WOW!
Dave Brown
Love the products!
David Johnston
It is like having an expert at my shoulder helping me…
Linda Shakespeare
Your software really helps make my job easier
Jeannie C.
Thanks for a terrific product that is worth every single cent!
Dianne Young
I love your product
Brad Gibson
Awesome!!!
Sheila Blanchard