IF AND formula in Excel

The tutorial shows how to use IF together with the AND function in Excel to check multiple conditions in one formula.

Some things in the world are finite. Others are infinite, and the IF function seems to be one of such things. On our blog, we already have a handful of Excel IF tutorials and still discover new uses every day. Today, we are going to look at how you can use IF together with the AND function to evaluate two or more conditions at the same time.

IF AND statement in Excel

In order to build the IF AND statement, you obviously need to combine the IF and AND functions in one formula. Here's how:

IF(AND(condition1, condition2,…), value_if_true, value_if_false)

Translated into plain English, the formula reads as follows: IF condition 1 is true AND condition 2 is true, do one thing, otherwise do something else.

As an example, let's make a formula that checks if B2 is "delivered" and C2 is not empty, and depending on the results, does one of the following:

  • If both conditions are TRUE, mark the order as "Closed".
  • If either condition is FALSE or both are FALSE, then return an empty string ("").

=IF(AND(B2="delivered", C2<>""), "Closed", "")

The screenshot below shows the IF AND function in Excel:
IF AND statement in Excel

If you'd like to return some value in case the logical test evaluates to FALSE, supply that value in the value_if_false argument. For example:

=IF(AND(B2="delivered", C2<>""), "Closed", "Open")

The modified formula outputs "Closed" if column B is "delivered" and C has any date in it (non-blank). In all other cases, it returns "Open":
IF AND formula in Excel

Note. When using an IF AND formula in Excel to evaluate text conditions, please keep in mind that lowercase and uppercase are treated as the same character. If you are looking for a case-sensitive IF AND formula, wrap one or more arguments of AND into the EXACT function as it is done in the linked example.

Now that you know the syntax of the Excel IF AND statement, let me show you what kind of tasks it can solve.

Excel IF: greater than AND less than

In the previous example, we were testing two conditions in two different cells. But sometimes you may need to run two or more tests on the same cell. A typical example is checking if a cell value is between two numbers. The Excel IF AND function can easily do that too!

Let's say you have some sales numbers in column B and you are requested to flag the amounts greater than $50 but less than $100. To have it done, insert this formula in C2 and then copy it down the column:

=IF(AND(B2>50, B2<100), "x", "")
IF formula to check the 'greater than AND less than' condition

If you need to include the boundary values (50 and 100), use the less than or equal to operator (<=) and greater than or equal to (>=) operator:

=IF(AND(B2>=50, B2<=100), "x", "")
Find values between two numbers, including the boundary values.

To process some other boundary values without changing the formula, enter the minimum and maximum numbers in two separate cells and refer to those cells in your formula. For the formula to work correctly in all the rows, be sure to use absolute references for the boundary cells ($F$1 and $F$2 in our case):

=IF(AND(B2>=$F$1, B2<=$F$2), "x", "")
IF AND formula to flag values between the specified numbers

By using a similar formula, you can check if a date falls within a specified range.

For example, let's flag dates between 10-Sep-2018 and 30-Sep-2018, inclusive. A small hurdle is that dates cannot be supplied to the logical tests directly. For Excel to understand the dates, they should be enclosed in the DATEVALUE function, like this:

=IF(AND(B2>=DATEVALUE("9/10/2018"), B2<=DATEVALUE("9/30/2018")), "x", "")

Or simply input the From and To dates in two cells ($F$1 and $F$2 in this example) and "pull" them from those cells by using the already familiar IF AND formula:

=IF(AND(B2>=$F$1, B2<=$F$2), "x", "")
IF AND formula to find dates that fall within a specified range

For more information, please see Excel IF statement between two numbers or dates.

IF this AND that, then calculate something

Apart from returning predefined values, the Excel IF AND function can also perform different calculations depending on whether the specified conditions are TRUE or FALSE.

To demonstrate the approach, we will be calculating a bonus of 5% for "Closed" sales with the amount greater than or equal to $100.

Assuming the amount is in column B and the order status in column C, the formula goes as follows:

=IF(AND(B2>=100, C2="closed"), B2*10%, 0)
If the specified conditions are TRUE, then calculate something

The above formula assigns zero to the rest of the orders (value_if_false = 0). If you are willing to give a small stimulating bonus, say 3%, to orders that do not meet the conditions, include the corresponding equation in the value_if_false argument:

=IF(AND(B2>=100, C2="closed"), B2*10%, B2*3%)
IF AND formula to perform different calculations depending on whether the conditions are TRUE or FALSE

Multiple IF AND statements in Excel

As you may have noticed, we have evaluated only two criteria in all the above examples. But there is nothing that would prevent you from including three and more tests in your IF AND formulas as long as they comply with these general limitations of Excel:

  • In Excel 2007 and higher, up to 255 arguments can be used in a formula, with a total formula length not exceeding 8,192 characters.
  • In Excel 2003 and lower, no more than 30 arguments are allowed, with a total length not exceeding 1,024 characters.

As an example of multiple AND conditions, please consider these ones:

  • Amount (B2) should be greater than or equal to $100
  • Order status (C2) is "Closed"
  • Delivery date (D2) is within the current month

Now, we need an IF AND statement to identify the orders for which all 3 conditions are TRUE. And here it is:

=IF(AND(B2>=100, C2="Closed", MONTH(D2)=MONTH(TODAY())), "x", "")

Given that the 'current month' at the moment of writing was October, the formula delivers the below results:
Multiple IF AND statements in Excel

Nested IF AND statements

When working with large worksheets, chances are that you may be required to check a few sets of different AND criteria at a time. For this, you take a classic Excel nested IF formula and extend its logical tests with AND statements, like this:

IF(AND(…), output1, IF(AND(…), output2, IF(AND(…), output3, output4)))

To get the general idea, please look at the following example.

Supposing you want to rate your service based on the shipment cost and estimated time of delivery (ETD):

  • Excellent: shipment cost under $20 and ETD under 3 days
  • Poor: shipment cost over $30 and ETD over 5 days
  • Average: anything in between

To get it done, you write two individual IF AND statements:

IF(AND(B2<20, C2<3), "Excellent", …)

IF(AND(B2>30, C2>5), "Poor", …)

…and nest one into the other:

=IF(AND(B2>30, C2>5), "Poor", IF(AND(B2<20, C2<3), "Excellent", "Average"))

The result will look similar to this:
Nested IF AND statements

More formula examples can be found in Excel nested IF AND statements.

Case-sensitive IF AND function in Excel

As mentioned in the beginning of this tutorial, Excel IF AND formulas do not distinguish between uppercase and lowercase characters because the AND function is case-insensitive by nature.

If you are working with case-sensitive data and want to evaluate AND conditions taking into account the text case, do each individual logical test inside the EXACT function and nest those functions into your AND statement:

IF(AND(EXACT(cell,"condition1"), EXACT(cell,"condition2")), value_if_true, value_if_false)

For this example, we are going to flag orders of a specific customer (e.g. the company named Cyberspace) with an amount exceeding a certain number, say $100.

As you can see in the below screenshot, some company names in column B look the same excerpt the characters case, and nevertheless they are different companies, so we have to check the names exactly. The amounts in column C are numbers, and we run a regular "greater than" test for them:

=IF(AND(EXACT(B2, "Cyberspace"), C2>100), "x", "")

To make the formula more flexible, you can input the target customer name and amount in two separate cells and refer to those cells. Just remember to lock the cell references with $ sign ($G$1 and $G$2 in our case) so they won't change when you copy the formula to other rows:

=IF(AND(EXACT(B2, $G$1), C2>$G$2), "x", "")

Now, you can type any name and amount in the referenced cells, and the formula will flag the corresponding orders in your table:
Case-sensitive IF AND function in Excel

IF OR AND formula in Excel

In Excel IF formulas, you are not limited to using only one logical function. To check various combinations of multiple conditions, you are free to combine the IF, AND, OR and other functions to run the required logical tests. Here is an example of IF AND OR formula that tests a couple of OR conditions within AND. And now, I will show you how you can do two or more AND tests within the OR function.

Supposing, you wish to mark the orders of two customers with an amount greater than a certain number, say $100.

In the Excel language, our conditions are expressed in this way:

OR(AND(Customer1, Amount>100), AND(Customer2, Amount>100)

Assuming the customer names are in column B, amounts in column C, the 2 target names are in G1 and G2, and the target amount is in G3, you use this formula to mark the corresponding orders with "x":

=IF(OR(AND(B2=$G$1, C2>$G$3), AND(B2=$G$2, C2>$G$3)), "x", "")

The same results can be achieved with a more compact syntax:

=IF(AND(OR(B2=$G$1,B2= $G$2), C2>$G$3), "x", "")

IF AND OR formula in Excel

Not sure you totally understand the formula's logic? More information can be found in Excel IF with multiple AND/OR conditions.

That's how you use the IF and AND functions together in Excel. Thank you for reading and see you next week!

Practice workbook

IF AND Excel – formula examples (.xlsx file)


  1. I am trying to get that "Yes" and "No" TAT. I don't get the formula well.
    I also used this formula but it didn't push through with "Yes" No".
    =IF(AND(O12,"Building to Building",E12""),"Yes","")=IF(AND(O12,"Within the Floor",E12""),"Yes","")
    Type of Request SLA
    Within the Floor 10
    Floor to Floor 10
    Building to Building 23

    • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Note how to correctly use IF AND is described in the article above.

  2. Pleas e help,
    How to create a formula for the following information

    Column A Column B Column C Column D Column E Column F Column G
    Milestone date Amount Paid on Milestone date Amount Paid on Total Paid

    Problem: I want to add the total amounts paid in column G (total paid) with the amounts of columns B and E ONLY if there is a date in columns C and/or F.

    Really appreciate your help

  3. I pull service numbers every quarter from our database and put into a spreadsheet because I'll be reporting them by county to 25 entities (some get the results of 1 county, some up to 7 counties) and each county has its own tab in the workbook. The spreadsheet compares the current year to 2 previous years in 15+ categories (rows). I have 3 YTD columns (one for this year and one for each of the last two) as well as 12 columns representing each of the 4 quarters for each year. It never fails that when the next quarter comes around I'll forget to update one of the previous YTD calculations and my numbers are all skewed.
    So for example, in Q1 a particular cell should read "=c3", and then Q2 the formula would be "=c3+f3", with Q3 adding in i3 and Q4 adding in L3.
    Is there a way I can get it to choose which calculation is done if I add a quarter reference somewhere. If the reference cell says 2 it'll return the result of "=c3+f3", if it says 4, it'll return the result of "c3+f3+i3+l3"?

  4. Ugh, I'm stuck here...trying to figure out how to pull data within a range and it's not working.

    Basically I can pull the info I need from the C column with this formula on anything that matches F as 7 or greater:


    I can also do the same for anything 3 and under by using: =IF(F3:F5<3.1,C3:C5,"")

    However, I want to pull the same data for the range 4-6 and I can't figure out how...I've tried a couple of things including:
    =IF(AND(F3:F5<3.1,F3:F5 or 3.9 and <6.1 I can't figure out the formula...what am I missing?

  5. I need someone to tell me why I am not getting proper calculations:

    Below Time sheet calculations:

    Monday through Friday will have a "Y" in the E column. Y represent 7.5 hours

    However, if there is a value in G column (represent time off/leave time), needs to be deducted from 7.5 hour rate

    E Column contains either Y or N (Y = Worked 7.5 hrs, N = not work 0 hours
    G Column contains numbers (leave time). If N is used, the value is added to total hours in the total cell. However, if a person enters a Y and worked 1/2 day and took 1/2 off, as an example: 4.5 hours worked, and 3 hours vacation time. The day's total is 7.5. That is why in the "false" box the line (7.5 - G10) is added. But below formulas is not adding up or reducing hours when value Y changed to N and vice versa.

    =SUM(IF(AND(E10="Y",G10=" "),7.5,(7.5-G10)))+SUM(IF(AND(E11="Y",G11=" "),7.5,(7.5-G11)))+SUM(IF(AND(E12="Y",G12=" "),7.5,(7.5-G12)))+SUM(IF(AND(E13="Y",G13=" "),7.5,(7.5-G13)))+SUM(IF(AND(E14="Y",G14=" "),7.5,(7.5-G14)))+SUM(IF(AND(E15="Y",G15=" "),7.5,(7.5-G15)))+SUM(IF(AND(E16="Y",G16=" "),7.5,(7.5-G16)))+SUM(IF(AND(E17="Y",G17=" "),7.5,(7.5-G17)))

    When I put this in the cell, I get weird number 52.20 of something, not 37.5 if there was G column has no data. The (7.5-G10) is simply want

    I am sure there may be a better way to calculate. I am still just going about it the long way...at this time.

    I appreciate if you have a better solution...email me if you can.

    Thank you everyone for participating on this discussion.

    email: gilinnc @ gmail . com

  6. Hi Sir,

    I need a single formula to validate multiple OR & AND to show true or false value.

    Case1: If A2=Apple is harvested in large scale, B2=Fruit, C2=1
    here if A2 has a specific text "Apple" and B2=Fruit and C2=1, the value should be "True"
    Case2: if A2=Mango is harvested in large scale, B2=Fruit, C2=2
    here if B2=Fruit & C2=2, the value should be True

    So either(Case1 or Case2) meets the above cateria the value should be true.

  7. RATING Percentage
    5 95-100%
    4 75-94%
    3 45-74%
    2 31-44%
    1 0-30%

    I want to insert if multiple conditions formula to rate 1-5 based on the percentage for above performance index. please Guide in excel how to apply if formula


  9. Can someone help me to find out the correct date using the following conditions.
    ​Earlier than July 1, 1949 - Output Age 70.6
    On or after July 1, 1949, but before January 1, 1951 - Output Age 72
    On or after January 1, 1951, but before January 1, 1960 - Output Age 73
    On or After January 1, 1960 Output Age 75

    Output Should be in Date Format.

    Thanks in Advance

  10. HI, i have a real time data in dates and time (1/1/2022 1:00am) for a year but i want to reduce the data for January by 30% , for February by 60% and so on. please help with this .thanks

  11. I have a spreadsheet where the Date in column N is dependent on data in columns H and J.
    Results for each outcome are held in columns M2, V2 and U2.
    i.e If the length of service in column J is less than 6 years, the date in column N would point to the formula in column M. If the length of service in column J is 6 years or more AND start age in column H is less than 18 then the date in column N would point to the formula in column V but if the length of service in column J is 6 years or more AND start age in column H is 18 or more then the date in column N would point to the formula in column U. How would I combine all this to bring back the desired results?

  12. I am trying to convert the following information into a formula for BMI Status on a spread sheet, but I have been unsuccessful all I get is a value error and can't figure out why. What is wrong with the formula?

    Underweight 40

    Here is my formula:

    =IF(AND(G39=18.5, G39=25, G39=30, G39=35, G39=40),"Obese Class 3","")

  13. How to formulate? IF row 2 and 3 has same EEID, then it should sum up the amount of EEID in rows 2 and 3. Then the result in ROw 3 since same EEID in row 2 should be 0. If not same EE ID like Row 1 and 2 result should be same amount in row 1

    EEID Code Amount Result
    1 1856996 VNGW12 3,060,000.00 3,060,000.00
    2 1716885 VNGW18 1,179,150.00 2,054,150.00
    3 1716885 VNGW18 875,000.00 - 0.00
    4 1716887 VNGW18 875,000.00 875,000.00

  14. I have problem in computing results with excel.
    I want to combine two sheets together and make it print REMARK that contains PASS OR the subjects failed

  15. I am creating an order form and I need the cell to only allow 240 or greater and in multiples of 20. Is it possible to do a nested formula in data validation that will do this?
    I use the =MOD(F64,20)=0 formula for other cells in data validation

      • HI,
        This formula =AND(MOD(F64,20)=0,F64>=240) worked great! Thank you so much!

        Am I able to add a function to add other cells to meet the 240 minimum requirement?
        F64 = 240 (still needs to be in multiples of 20)
        or F64+F66 = 240 (still needs to be in multiples of 20)
        or F64+F66+F68=240 (still needs to be in multiples of 20)
        or F64+F66+F68+F70=240 (still needs to be in multiple of 20)

  16. Hi!

    I'm trying to count up from 1 (2, 3, 4...), starting in column A2 (continuing down A3, A4, A5, A6....). However, I only want the counting up to proceed if two conditions are met, those being that B2 and C2 both = 1. So counting up will continue only if those are met, otherwise, I want the numbers to remain the same until the conditions are met.

    The problem is, I cannot get the following equation to work, as it only seems to return the FALSE value, and I can't find any examples of how to format a formula in a "Value if true (or false" field for the IF(AND) scenario.

    Here's the equation:
    =IF(AND(B3="1",C3="1"), A2+1, A2)

    Any advice will be appreciated!

  17. I have this formulas which i want it to work together in the same cell, I don't know which one should come first before the other.
    =IF(C5=39,"468",IF(C5=38,"456",IF(C5=37,"444",IF(C5=36,"432","no")))) Settings!E3-SUMIF('P&S'!H$5:H$34,'P&S'!B5,'P&S'!J$5:J$34)
    The cell cell is already displaying 480 pieces, so when they buy any piece it should display the remaining and also still display the SumIF function.

    In details is a stock management template and this, Settings!E3-SUMIF('P&S'!H$5:H$34,'P&S'!B5,'P&S'!J$5:J$34) do addition of pieces in cell D5 but I want it to also display the remaining of the pieces when a box is bought because we have 12 pieces in a box.
    I used the ampersand and it only do concatenate, so please can you help me with some unique idea?

    • Hi! Unfortunately, I don't really understand what result you want to get. Explain in more detail, give an example of the expected result.

  18. I am trying to calculate Gen X, Gen Y & Gen Z using Birth year(W2 in below formula), but i get #value error. Pleas help

    =IF(AND(W2>=1965,W2=1977,W2=1996,W2<=2015),"Gen Z","NA"))

  19. I am trying to do a nesting formula using greater or less than. Example

    It is multiplying the values to show 5 times the value $$ amount I need.
    How do I formulate this to pick one or the other or the other range?

    Is this an easy fix or do I need to do something more detailed?

    Thanks for the assistance.

    • Hi! The arguments of the SUMIF function cannot be other functions. I can't check your formula because it doesn't work. Also, I don't really understand what you want to calculate. If you explain it in more detail, I will try to help.

  20. =IF(AND(A2<=20,E2<20),"Pass","Fail") This formula works for the base, but the A column is ages and will have ranges in comparison to value allowable in column E.

    Column A ranges Coulumn E
    21-27 <=22
    28-39 =40 <=26

    Is there a way to write a formula for IF(AND for the value in Column A compared to the ranges and once it fits a range the number in Column E value is within tolerance for that range in Column A ex. The number in Column A is 26 so it fits the range of 21-27 and the number in column E is <=22 so it would result in "Pass" as the output.

    • Unfortunately, I can't understand what you want to do. Column E is not a number, but text. You can't compare text. Explain your question.

      • A B C D E F
        Age HT WT Waist BF% P/F =IF(AND(A2<=20,E2=40 and there are corresponding allowances for BF% for each range 20,22,24,26 respectively. I want to be able to when you enter the data in Columns A and E it to output in Column F either Pass of Fail. I can get it for a single range with the formula in the original post, but not sure if there is a way to have a IF(AND or IF(OR formula that refers to age in Column A associates that to one of the age ranges and compares to the BF % in Column E and if it is at or below the allowable BF% for the age range that the number in Column A is in, Column F would be the output of either Pass of Fail.

        • I tried to add a screenshot, but it would not let me and the spacing I had on my last reply did not stick. Column A is age, Column B is height, Column C is Weight, Column D is waist measurement, Column E is BF%, Column F is where I need the output to be pass or fail. When you enter the data in Columns A and E it to output in Column F either Pass of Fail. I can get it for a single range with the formula in the original post, but not sure if there is a way to have a IF(AND or IF(OR formula that refers to age in Column A associates that to one of the age ranges and compares to the BF % in Column E and if it is at or below the allowable BF% for the age range that the number in Column A is in, Column F would be the output of either Pass of Fail. There are four ranges for the age information and a corresponding BF % associated with each age range. Age ranges for Column A are =40 with Column E corresponding BF% being at or below 20, 22, 24, 26 respectively. Thank you!

          Current formula in Column F is =IF(AND(A2<=20,E2<20),"Pass","Fail") This is just for the first set of corresponding information of age <=20 with BF% <=20

        • I'm sorry, but your second message has no information to understand what you want to do. Write concretely what is written in A1 and E1 and what the result should be in F1. All variants.

  21. can you help me to make a formula for
    1f less than 100000 commission 0.03%
    100000 to 199999 commission 0.04%
    200000 to 500000 commission 0.04%
    more than 500000 commission 0.05%

  22. Hi, I would like to ask is there any other formula to replace this formula?

    Basically it is a function says: Matching the H1 (header) with BH2 (header in data lines), if this is the result able to match with the header --> take this AND if this is the result not able to match with the header, continue to match the next column in data lines.

    - "if and" functions
    - few same header contains in data lines to look up the result
    (column "BH" to "DR" are the data)
    (column "A" to "BF" contains the look up array/ headers)


    • Hi,

      Any other formula able to find the result from data lines?

      - currently using "if and" functions to get result
      - data lines contains same header
      - data lines contains 2 same row except the value amount

    • Hi! It is very difficult to understand a formula that contains unique references to your data, which I don't have. What result do you want to get? Give an example of the source data and the expected result.

  23. Hi! Please i have two sheets in my workbook and the first sheet contains setting which want it to reflect in my second sheet. This is how I want it, I have products and number of products in setting sheet and have created a table with define name. So i now validated the table in the second sheet. I want any product i select in the validated cell also display the number of products. Below is the formula which does not want to work proper for me. Thank You =IF(C5=Settings!C3,Settings!D3,IF(C5=Settings!C4,Settings!D4,IF(C5=Settings!C5,Settings!D5,IF(C5=Settings!C6,Settings!D6,IF(C5=Settings!C7,Settings!D7,IF(C5=Settings!C8,Settings!D8,IF(C5=Settings!C9,Settings!D9,IF(C5=Settings!C10,Settings!D10,IF(C5=Settings!C11,Settings!D11,IF(C5=Settings!C12,Settings!D12,IF(C5=Settings!C13,Settings!D13,IF(C5=Settings!C14,Settings!D14,IF(C5=Settings!C15,Settings!D15,IF(C5=Settings!C16,Settings!D16,IF(C5=Settings!C17,Settings!D17,IF(C5=Settings!C18,Settings!D18,IF(C5=Settings!C19,Settings!D19,IF(C5=Settings!C20,Settings!D20,IF(C5=Settings!C21,Settings!D21,IF(C5=Settings!C22,Settings!D22,IF(C5=Settings!C23,Settings!D23,IF(C5=Settings!C24,Settings!D24,IF(C5=Settings!C25,Settings!D25,IF(C5=Settings!C26,Settings!D26,IF(C5=Settings!C27,Settings!D27,IF(C5=Settings!C28,Settings!D28,IF(C5=Settings!C29,Settings!D29,IF(C5=Settings!C30,Settings!D30,IF(C5=Settings!C31,Settings!D31,IF(C5=Settings!C32,Settings!D32, "Not in Store"))))))))))))))))))))))))))))))

  24. I have a cell that displays the current date using the NOW function. I would like to run a formula that multiplies an existing cell value by 1.03 when the Now function = 01/01/2024.

    • Hi! Create the date you want using the DATE function and use it in the condition in the IF function. For example,


      Since the NOW function returns the date and time, I would recommend using the TODAY function to compare with the date.

  25. I am creating an order form and I am using data validation.
    I need the customer to enter a value equal to or greater than 3024 and in multiple of 36
    I have been using =MOD formula, how do I add the equal to or greater than?

  26. Hi,

    I have 2 columns of data, 1 with gender (F or M) & one with a score. Is is possible to write a formula that identifies those with a specific gender AND score? Can all females with a score of <16 and all males with a score of <27 be identified as "good" for example?

    Thanks for you help

  27. Good morning!
    I'm having trouble making the formula that i want within the excel formulas if you are able to give some insight it would be appreciated, or be able to tell me what i might possibly be doing wrong, the logic in my head to make the formula is this :
    =IF(AND(A1:A75=C1:C75,B1:B75>D1:D75), "Greater", "Less Than")

    I'm trying to compare two pivot tables, i need any column that matches the same name ie: any value from A1:A75 equals to exact values from C1:C75 then compare the same row from B1:B75 against D1:D75.

    I'm trying to have it do: if A1 = C1 and B1 > D1, greater, less than. but since it's a pivot table that changes, i can't get it to work properly. Any insight would be appreciated, Thank you!

      • Sad to hear,
        Thank you very much for the response!

      • If i extra the data from the sheets, is there a way i can compare values from A1 against C1:C75 that will show that value of B1 and then repeat that for A2,A3,A4...

        I'm trying to do it within an if statement but i think that I'm mistaken as I'm trying "=IF((A1=C1:C75),B1, "Not on list")", but if i try to do a similar input to A2 then it is giving me a "spill"

        Thank you again and sorry for multiple questions.

  28. Hi, good day to you sir.

    The information is really helpful.
    I would like to ask about the formula, this is correct?


  29. Hi, how can I make the formula below work?
    Can I combine IF with IF AND


    • Hi! Have you tried the ways described in this blog post? Based on your description, it is hard to completely understand your task. I don't know what you want to do, but maybe this formula will work:


  30. Hi

    I am trying to create formula that will give a true or yes (I don't mind which) result if in 3 cells, in different columns, certain codes are present. I have read these pages as thoroughly as I can but I think because I want it to look for more than one code it is not giving a 'true/yes' outcome when the conditions are met. This is the formula I have tried:


    I also tried:

    I need it to come back true if the cells contain a code starting with EX or GD. If all 3 cells do then it should return true/yes. It doesn't have to return anything if the conditions are not true, I don't mind having a blank cell.

    Thank you for your time.

  31. I need a formula to calculate tax slab First 100,000 is 0% Tax Next 350,000 is 25% Next 2,050,000 is 30% Excess of 2,500,000 is 35%
    I have achieved to get the correct result upto 30% Tax slab but I m failing to add the last slab of 35%
    Kindly assist me

    • Hi!
      Here is a sample formula that you can use:

      =MIN(C2,100)*0% + MIN(MAX(C2-100,0),350)*25% + MIN(MAX(C2-350-100,0),2050)*30% + MAX(C2-2500,0)*35%

  32. I have an excel file with the following columns (MINS, HOURS FREQUENCY, AVERAGE WEEKLY HOURS), and I am trying to write a formula to calculate the average weekly hours based on an average 12 week period, depending on the answer in the frequency column. Can anyone help with a nested formula

    If frequency = Daily, multiply hours by 5 (based on working days)
    If frequency = weekly, multiple hours by 1
    if frequency = monthly, divide hours by 4
    if frequency = quarterly, divide hours by 12


  33. If the employee is single deduct 15% tax from the basic salary.
    If the employee is married deduct 12% tax from the basic salary.
    Whether single or married deduct 3% tax for each dependent.

    I need help please 🙏🙏

    • i think your question is incomplete because you have mention that employee single deduct 15% and married deduct 12% it is understanding but the next condition u have written that either single or married deduct 3% it not possible because u already mention in question about that so i think this question is wrong

  34. I have a master workbook with Employee Names listed in Column A

    I want it to look at the Employee Years of Service workbook, find the Current Year Column and return that number

    Example of Employee Years of Service Sheet

    23 24 25 26 27 (Year)
    Employee 1 5 6 7 8 9
    Employee 2 1 2 3 4 5
    Employee 3 1 2 3 4 5
    Employee 4 3 4 5 6 7
    Employee 5 12 13 14 15 16
    Employee 6 7 8 9 10 11

    Example of what I'm looking for in the "Master"

    Employee 1 (Find Employee 1 in the Years of Service Workbook, Find the Current Year and return a 5)

  35. Hi Alexander, I am having difficulty in getting the right answer when I combine these two formulas:

    1st Data - Column/Row J12: Sports Information and Resource Centre (SIRC) and Column/Row K12: Museum(Sports Museum) >> Level 1 >> D-Blackbox Theatre #01-04, 05-CC01-211
    Formula: = IF(J12 = "Sports Information and Resource Centre (SIRC)", MID(K12,SEARCH("(",K12)+1,SEARCH(")",K12)-SEARCH("(",K12)-1), J12)
    Return: Sports Museum //correct

    2nd Data - Column/Row J54: Precinct (PCT) and Column/Row K54: WSC >> Stadium Riverside Walk (Board Walk)
    Formula: =IF(J54="Precinct (PCT)",TRIM(RIGHT(SUBSTITUTE(K54,">",REPT(" ",LEN(K54))),LEN(K54))))
    Return: Stadium Riverside Walk (Board Walk) //correct

    Combined Formula that I used:
    =IFS(J43="Sports Information and Resource Centre (SIRC)",MID(K43,SEARCH("(",K43)+1,SEARCH(")",K43)-SEARCH("(",K43)-1),IFS(J43="Precinct (PCT)",TRIM(RIGHT(SUBSTITUTE(K35,">",REPT(" ",LEN(K35))),LEN(K35)))),J43)

    Objective: To get the same correct results as above combining the two formulas I have created.

    Note: I have tried, IF(AND and IF(OR but the answer still incorrect.

    Hope you can assist me. Thank you!


    • Hi!
      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:

      =IF(J54="Precinct (PCT)",TRIM(RIGHT(SUBSTITUTE(K54,">",REPT(" ",LEN(K54))),LEN(K54))),IF(J12 = "Sports Information and Resource Centre (SIRC)", MID(K12,SEARCH("(",K12)+1,SEARCH(")",K12)-SEARCH("(",K12)-1), J12))

      For more information, please look at this article: Excel Nested IF statements - examples, best practices and alternatives.

      • Thanks a lot! Very helpful!

  36. I am trying to write a formula to compare two columns of text data that will include names of companies. In some instances, the names of the companies are not written in the exact same manner, however the company is one in the same (ex: The ABC Company and ABC Company). Is there a formula for this?

  37. Hi. I'm trying to write formula with statement as follow :

    cell P6 : Completion Date - Received Date
    cell O6 : Target Date - Received Date

    Formula as folliw
    =IF(P60), "DELAY", "OVER"))

    It's shows OK & OVER. But no showing DELAY for case of no input in the cell J6.

  38. I have to compare columns of values to see if C=D within $2.00. Basically we are accomodating the system rounding the calculation differently than the other company's system. So if Column C says $50 and column D says $48. I will want it to return true. Vice versa - if column C says $50 and Column D says $51.78 - I still want it to return true. And of course if column C = $50 and column D = $50, I want it to return True.

    I have used an if formula for this before, I believe, but of course I cannot find it in my past spreadsheets now :(

    Can you help?

  39. Hi, I have been using the nested formula for quite some time as below, it worked well, but however when I try to include one more extra condition the output I receive is 0. Kindly advise

    Old Working :

    IF(E7="Rwanda","y"," "))))))

    New : Not working

    IF(E6="Rwanda","y"," "))))))

    • Hi!
      I can't check your formula as I don't have your data. I can guess you are trying to compare the number 40 with the text string "40". Do not use double quotes for numbers.

  40. I am working on a spreadsheet to help organize files. What I would like to do is have a cell that calculates the date a file can be destroyed based on the type of case and date the case was closed. The case types in Column D are being pulled from a separate sheet, same workbook, so I can use the drop down feature to put them in my spreadsheet. The date the file is closed is in Column E and I would like Column F to auto-populate with the destruction date based on the date in Column E and the case type in Column D. I have been trying to accomplish this with conditional formatting since I will have several case types to add in.

    Example, if file is for attendance records that we are required to keep for 3 years:

    IF($D3="ATTENDANCE", DATE(YEAR(E3)+3, MONTH(E3), DATE(E3)), 0)

    So far none of the variations of this formula that I have tried have worked.
    Thank you!

  41. Hi there,
    I have been struggling to find a formula that will work in this situation. I need to know how many weeks between Approval Date and Start Date and then once I have that, IF that number of weeks is Greater Than 6 Weeks and IF that number of weeks is Greater Than 2 Weeks. Then I will show on a chart how many Approvals we have gotten on each project that were 6 Weeks or more in advance and how many were at least 2 weeks or more in advance. But my formulas keep coming up with errors.

    Approval Date Start Date Weeks Btw Approval to Start >6 Weeks >2 Weeks
    1/17/2023 3/15/2023 8.14 Yes6 Yes2
    1/30/2023 1/25/2023 #NUM! #NUM! No2
    11/16/2022 3/13/2023 16.71 Yes6 Yes2
    Under Review 1/31/2023 No6 No2

    • Hi!
      I don't know what formula you are using, but on the second row, the Start Date is less than the Approval Date. In the other rows, it is the opposite.

  42. I have been trying to see if I can create a formula that will help me with my clients. I am a nutrition coach, and in one of my cells I have a formula that calculates the BMI (Body Mass Index) of the person. BMI falls within six categories:

    18.5 = Underweight
    18.6 to 24.9 = Healthy Range
    25 to 29.9 = Pre-Obesity
    30 to 34 = Obesity Class 1
    35 to 39.9 = Obesity Class 2
    40 + = Obesity Class 3

    So in the cell next to it, I want it to display the class type.

    So let's say that cell B13 has the number, I want C13 to display what class they fall under.

    How would I go by doing that? I have tried multiple "IF AND" formulas and I just can't seem to get it right.

  43. Hello,

    Can you help me make a formula, I had it before but it got lost and now struggling to remake it.

    So I have a row for example A1 - B1 - C1

    if A1 is filled with for example £100 I need to minus 2% into with the sum into E1

    if A1 is empty but B1 is filled then I need it to minus 3% with the sum into E1

    then the same for C1 if A & B are empty but C is filled.


  44. Hi!

    I'm still unbale to identify the error on the following formula. Excell keeps replying back "There is a problem with the formula".

    any guidance will be appreciated.

    =IFERROR(IF(OR(X2>=5000),"DNB",IF(OR(W2-AN2=-500),"DNB",IF(OR(((W2-AN2))/AN2)>=0.1,"DNB", IF(OR(AND(T2="1'-Customer Shortage",S2="N",AN2>=5000,"DNB")))),"N/A").

    the formula works thill this statment:


    however this portions, breaks it.

    IF(OR(AND(T2="1'-Customer Shortage",S2="N",AN2>=5000,"DNB")))),"N/A")



    • Hi!
      Based on your description, it is hard to completely understand your task. However, I’ll try to guess and offer you the following formula:

      =IFERROR(IF(OR(X2>=5000),"DNB",IF(OR(W2-AN2=-500),"DNB",IF(OR((W2-AN2)/AN2>=0.1),"DNB", IF(OR(AND(T2="1'-Customer Shortage",S2="N",AN2>=5000)),"DNB")))),"N/A")

      OR operators are not needed in this formula.

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 :)