Excel IF statement with multiple conditions

The tutorial shows how to create multiple IF statements in Excel with AND as well as OR logic. Also, you will learn how to use IF together with other Excel functions.

In the first part of our Excel IF tutorial, we looked at how to construct a simple IF statement with one condition for text, numbers, dates, blanks and non-blanks. For powerful data analysis, however, you may often need to evaluate multiple conditions at a time. The below formula examples will show you the most effective ways to do this.

How to use IF function with multiple conditions

In essence, there are two types of the IF formula with multiple criteria based on the AND / OR logic. Consequently, in the logical test of your IF formula, you should use one of these functions:

  • AND function - returns TRUE if all the conditions are met; FALSE otherwise.
  • OR function - returns TRUE if any single condition is met; FALSE otherwise.

To better illustrate the point, let's investigate some real-life formulas examples.

Excel IF statement with multiple conditions (AND logic)

The generic formula of Excel IF with two or more conditions is this:

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

Translated into a human language, the formula says: If condition 1 is true AND condition 2 is true, return value_if_true; else return value_if_false.

Suppose you have a table listing the scores of two tests in columns B and C. To pass the final exam, a student must have both scores greater than 50.

For the logical test, you use the following AND statement: AND(B2>50, C2>50)

If both conditions are true, the formula will return "Pass"; if any condition is false - "Fail".

=IF(AND(B2>50, B2>50), "Pass", "Fail")

Easy, isn't it? The screenshot below proves that our Excel IF /AND formula works right: Excel IF statement with multiple AND conditions

In a similar manner, you can use the Excel IF function with multiple text conditions.

For instance, to output "Good" if both B2 and C2 are greater than 50, "Bad" otherwise, the formula is:

=IF(AND(B2="pass", C2="pass"), "Good!", "Bad") Excel IF function with multiple text conditions

Important note! The AND function checks all the conditions, even if the already tested one(s) evaluated 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 statement may result in an error because of this specificity. For example, the below formula would return #DIV/0! ("divide by zero" error) 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")

For more information, please see IF AND formula in Excel.

Excel IF function with multiple conditions (OR logic)

To do one thing if any condition is met, otherwise do something else, use this combination of the IF and OR functions:

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

The difference from the IF / AND formula discussed above is that Excel returns TRUE if any of the specified conditions is true.

So, if in the previous formula, we use OR instead of AND:

=IF(OR(B2>50, B2>50), "Pass", "Fail")

Then anyone who has more than 50 points in either exam will get "Pass" in column D. With such conditions, our students have a better chance to pass the final exam (Yvette being particularly unlucky failing by just 1 point :) Excel IF function with multiple OR conditions

Tip. In case you are creating a multiple IF statement with text and testing a value in one cell with the OR logic (i.e. a cell can be "this" or "that"), then you can build a more compact formula using an array constant.

For example, to mark a sale as "closed" if cell B2 is either "delivered" or "paid", the formula is:

=IF(OR(B2={"delivered", "paid"}), "Closed", "")

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

IF with multiple AND & OR statements

If your task requires evaluating several sets of multiple conditions, you will have to utilize both AND & OR functions at a time.

In our sample table, suppose you have the following criteria for checking the exam results:

  • Condition 1: exam1>50 and exam2>50
  • Condition 2: exam1>40 and exam2>60

If either of the conditions is met, the final exam is deemed passed.

At first sight, the formula seems a little tricky, but in fact it is not! You just express each of the above conditions as an AND statement and nest them in the OR function (since it's not necessary to meet both conditions, either will suffice):

OR(AND(B2>50, C2>50), AND(B2>40, C2>60)

Then, use the OR function for the logical test of IF and supply the desired value_if_true and value_if_false values. As the result, you get the following IF formula with multiple AND / OR conditions:

=IF(OR(AND(B2>50, C2>50), AND(B2>40, C2>60), "Pass", "Fail")

The screenshot below indicates that we've done the formula right: IF with multiple AND & OR statements

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

  • In Excel 2007 and higher, you have no more than 255 arguments, and the total length of the IF formula does not exceed 8,192 characters.
  • In Excel 2003 and lower, there are no more than 30 arguments, and the total length of your IF formula does not exceed 1,024 characters.

Nested IF statement to check multiple logical tests

If you want to evaluate multiple logical tests within a single formula, then you can nest several functions one into another. Such functions are called nested IF functions. They prove particularly useful when you wish to return different values depending on the logical tests' results.

Here's a typical example: suppose you want to qualify the students' achievements as "Good", "Satisfactory" and "Poor" based on the following scores:

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

Before writing a formula, consider the order of functions you are going to nest. Excel will evaluate the logical tests in the order they appear in the formula. Once a condition evaluates to TRUE, the subsequent conditions are not tested, meaning the formula stops after the first TRUE result.

In our case, the functions are arranged from largest to smallest:

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

Naturally, you can nest more functions if needed (up to 64 in modern versions). Nested IF statement in Excel

For more information, please see How to use multiple nested IF statements in Excel.

Excel IF array formula with multiple conditions

Another way to get an Excel IF to test multiple conditions is by using an array formula.

To evaluate conditions with the AND logic, use the asterisk:

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

To test conditions with the OR logic, use the plus sign:

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

To complete an array formula correctly, press the Ctrl + Shift + Enter keys together. In Excel 365 and Excel 2021, this also works as a regular formula due to support for dynamic arrays.

For example, to get "Pass" if both B2 and C2 are greater than 50, the formula is:

=IF((B2>50) * (C2>50), "Pass", "Fail") IF array formula with multiple AND conditions

In my Excel 365, a normal formula works just fine (as you can see in the screenshots above). In Excel 2019 and lower, remember to make it an array formula by using the Ctrl + Shift + Enter shortcut.

To evaluate multiple conditions with the OR logic, the formula is:

=IF((B2>50) + (C2>50), "Pass", "Fail") IF array formula with multiple OR conditions

Using IF together with other functions

This section explains how to use IF in combination with other Excel functions and what benefits this gives to you.

Example 1. If #N/A error in VLOOKUP

When VLOOKUP or other lookup function cannot find something, it returns a #N/A error. To make your tables look nicer, you can return zero, blank, or specific text if #N/A. For this, use this generic formula:

IF(ISNA(VLOOKUP(…)), value_if_na, VLOOKUP(…))

For example:

If #N/A return 0:

If the lookup value in E1 is not found, the formula returns zero.

=IF(ISNA(VLOOKUP(E1, A2:B10, 2,FALSE )), 0, VLOOKUP(E1, A2:B10, 2, FALSE))

If #N/A return blank:

If the lookup value is not found, the formula returns nothing (an empty string).

=IF(ISNA(VLOOKUP(E1, A2:B10, 2,FALSE )), "", VLOOKUP(E1, A2:B10, 2, FALSE))

If #N/A return certain text:

If the lookup value is not found, the formula returns specific text.

=IF(ISNA(VLOOKUP(E1, A2:B10, 2,FALSE )), "Not found", VLOOKUP(E1, A2:B10, 2, FALSE)) If #N/A error in VLOOKUP

For more formula examples, please see VLOOKUP with IF statement in Excel.

Example 2. IF with SUM, AVERAGE, MIN and MAX functions

To sum cell values based on certain criteria, Excel provides the SUMIF and SUMIFS functions.

In some situations, your business logic may require including the SUM function in the logical test of IF. For example, to return different text labels depending on the sum of the values in B2 and C2, the formula is:

=IF(SUM(B2:C2)>130, "Good", IF(SUM(B2:C2)>110, "Satisfactory", "Poor"))

If the sum is greater than 130, the result is "good"; if greater than 110 – "satisfactory', if 110 or lower – "poor". Using the IF function with SUM

In a similar fashion, you can embed the AVERAGE function in the logical test of IF and return different labels based on the average score:

=IF(AVERAGE(B2:C2)>65, "Good", IF(AVERAGE(B2:C2)>55, "Satisfactory", "Poor"))

Assuming the total score is in column D, you can identify the highest and lowest values with the help of the MAX and MIN functions:

=IF(D2=MAX($D$2:$D$10), "Best result", "")

=IF(D2=MAX($D$2:$D$10), "Best result", "")

To have both labels in one column, nest the above functions one into another:

=IF(D2=MAX($D$2:$D$10), "Best result", IF(D2=MIN($D$2:$D$10), "Worst result", "")) Using IF together with the MIN and MAX functions

Likewise, you can use IF together with your custom functions. For example, you can combine it with GetCellColor or GetCellFontColor to return different results based on a cell color.

In addition, Excel provides a number of functions to calculate data based on conditions. For detailed formula examples, please check out the following tutorials:

  • COUNTIF - count cells that meet a condition
  • COUNTIFS - count cells with multiple criteria
  • SUMIF - conditionally sum cells
  • SUMIFS - sum cells with multiple criteria

Example 3. IF with ISNUMBER, ISTEXT and ISBLANK

To identify text, numbers and blank cells, Microsoft Excel provides special functions such as ISTEXT, ISNUMBER and ISBLANK. By placing them in the logical tests of three nested IF statements, you can identify all different data types in one go:

=IF(ISTEXT(A2), "Text", IF(ISNUMBER(A2), "Number", IF(ISBLANK(A2), "Blank", ""))) IF with ISNUMBER, ISTEXT and ISBLANK

Example 4. IF and CONCATENATE

To output the result of IF and some text into one cell, use the CONCATENATE or CONCAT (in Excel 2016 - 365) and IF functions together. For example:

=CONCATENATE("You performed ", IF(B1>100,"fantastic!", IF(B1>50, "well", "poor")))

=CONCAT("You performed ", IF(B1>100,"fantastic!", IF(B1>50, "well", "poor")))

Looking at the screenshot below, you'll hardly need any explanation of what the formula does: Using IF and CONCATENATE

IF ISERROR / ISNA formula in Excel

The modern versions of Excel have special functions to trap errors and replace them with another calculation or predefined value - IFERROR (in Excel 2007 and later) and IFNA (in Excel 2013 and later). 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.

For example, to replace the "divide by zero" error (#DIV/0!) with your custom text, you can use the following formula:

=IF(ISERROR(A2/B2), "N/A", A2/B2) Using IF together with ISERROR

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!

Practice workbook for download

Excel IF multiple criteria - examples (.xlsx file)

4492 comments

  1. Hi there,

    Could you please help me when this IF formula??

    If x<1000%= Report
    If x<500%= Report
    If x<300%= Report
    If x<200%= Report
    If x<150%= Report
    If x<120%= Report
    If x<100%= Report

  2. Hi, may I ask if how can I able to solve this

    here's my formula
    =INDEX(A1:I34,MATCH(L13,A2:A34,0),MATCH(K13,A1:I1,0))

    by which L13 = G.22
    and K13 = /2

    they'r using two cells for look up values (K13, L13)

    what I wanted is, to use just ONE cell, with delimiter, per se: N6 = G.22/2

    =INDEX(A1:I34,MATCH(N6,A2:A34,0),MATCH(N6,A1:I1,0))

    • I solved that formula using this
      =INDEX('CY2019'!A1:I34,MATCH(LEFT(G13,4),'CY2019'!A1:A34,0),MATCH(RIGHT(G13,2),'CY2019'!A1:I1,0))

      BUT how to solve this?

      what I wanted is if the result is less than 10,000 it'll post 137.50, if it exceed 10,000 it'll use this formula =((A13*2.75%)/2)*12
      BUT if result exceeds 40,000 it'll post 550

      =IF (AND(K13*2.75%)=10000/2)*12

      • Hello,

        If I understand your task correctly, please try the following formula:

        =IFS(A1<10000,137.5,A1>40000,550,A1>=10000,((A13*2.75%)/2)*12)

        Hope this will help you!

  3. Suppose there are three different values in three different cells of ms-excel.. Use if statement to find the greatest of three numbers stored in cell.

    • Hi Amanpreet,

      It can be done with a simple MAX formula like this: =MAX(A1:A3)
      Or this one for non-contiguous cells: =MAX(A1, C1, E1)

      • 18.00% ₹ 79.20
        18.00% ₹ 40.50
        18.00% ₹ 15.48
        18.00% ₹ 18.90
        12.00% ₹ 122.40
        18.00% ₹ 68.40
        18.00% ₹ 270.00
        18.00% ₹ 45.00
        18.00% ₹ 48.60
        18.00% ₹ 990.00
        18.00% ₹ 75.60
        18.00% 27.00
        18.00% 360.00
        0.00% 0.00
        18.00% 15.12
        0.00% 0.00
        i want to calculate result of this both column in a separate row if column has 18% then in row it should be calculate its percentage and amount if column has 12%,5% or 0% it should be shown in below row

  4. Can someone help me with making a formula for a cell so that IF A1=X and B1=Y, then C1=Z, or IF A1=X, B1=W, then C1=U, where x is any number between 740 and 760, Y=65-70, Z=-.250, W=71-75, U=-.5.

    i want to make it all in one cell so that base on the first two cell, Cell C would know what value to input.

    • Hello, Nguyen,

      Please try the following formula:

      =IF(AND(A1>=740,A1<=760),IF(AND(B1>=65,B1<=70),"-.250",IF(AND(B1>=71,B1<=75),"-.5","")),"")

      Hope it will help you.

  5. I am trying these condition:

    If the cells = T01 and another cells is more than 50% result = pass if not fail
    If the cells = T02 and another cells is equal to 100% result = pass if not fail
    If the cells = T03 and another cells is more than 50% result = pass if not fail
    If the cells = T04 and another cells is equal to 100% result = pass if not fail

    How should my formula be?

    • Hello,

      For me to understand the problem better, please send me a small sample workbook with your source data and the result you expect to get to support@ablebits.com. Please don't worry if you have confidential information there, we never disclose the data we get from our customers and delete it as soon as the problem is resolved.
      Please also don't forget to include the link to this comment into your email.
      I'll look into your task and try to help.

  6. I am trying to nest the following IF AND function with IFERROR:

    IFERROR(IF(AND(D5>0,G5>0,"Voucher Paid",IF(AND(D50,"Credit Taken in Payment",)))"Processed Not Paid Yet")

    Column G is pulling data from a payment tab that has both the amounts paid and #N/A where the payment has not yet been made.

    • Hello Christine,

      For me to understand the problem better, please send me a small sample workbook with your source data and the result you expect to get to support@ablebits.com. Please don't worry if you have confidential information there, we never disclose the data we get from our customers and delete it as soon as the problem is resolved.
      Please also don't forget to include the link to this comment into your email.

      I'll look into your task and try to help.

  7. Hi, I have some data given below:

    Company Invoice# Currency
    1060 0004A00000983 BRL
    1045 3837 BRL
    1060 238109 USD
    1055 688143 USD
    1091 TOL16036 MXN
    1065 0004A00005420 MXN

    I want to know that:
    1. is there any invoice number preceding with zero
    2. if it is there of which company (1045/1060/1091/1055/1065)
    3. if it is of 1060 then the currency should not be BRL
    4. if it is of 1065 display the text as "1065-no need to consider"

    is possible to check all these conditions together in one cell. could any one please help me on this..?

    • Hello,

      Please try the following formula:

      =IF(LEFT(B2,1)="0"," 1. is there any invoice number preceding with zero ","") & IF(OR(A2=1045,A2=1060,A2=1091,A2=1055,A2=1065)," 2. if it is there of which company (1045/1060/1091/1055/1065) ","") & IF(AND(A2=1060,C2="BRL")," 3. if it is of 1060 then the currency should not be BRL ","") & IF(A2=1065," 1065-no need to consider ","")

      Hope it will help you.

  8. dear all,

    Will you describe formula with if and or condition in text format for me

    • Hello,

      Please describe in more detail what difficulties you’ve encountered when writing a formula with IF and OR. For us to understand you task better, please send me a small sample workbook with your source data and the result you expect to get to support@ablebits.com. Please don't worry if you have confidential information there, we never disclose the data we get from our customers and delete it as soon as the problem is resolved.

      Please also don't forget to include the link to this comment into your email.

      I'll look into your task and try to help.

  9. Hey guys,

    Just wondering if anyone can help me with this statement or if its even possible without add-ons (Cause have to suffer the Mac life), but is it possible to have an IF statement where if the statement is true then it creates a result for a different cell.. for example:

    formula in cell E6
    =IF(B4="AC1", [value_if_true] B6=D6)
    formula in cell G6
    =IF(B4="AC2, [value_if_true] B6=F6)
    etc...

    the reason why the logical test is a text value is because 'B4' is a dropdown menu and im trying to make B4 a dependent foreign key.. essentially trying to make it a many-to-one relationship.. any tips would be greatly appreciated

  10. I have Data Base contains about 500 person with many different jobs.
    I want to show all names under the same job as:
    Secretary :
    Jone
    Maic
    Tena
    Executive Director
    Smeth
    Jemy
    Mac
    Like that .... can you help me please
    Thanks
    Waiting for your answer
    Yasser

  11. Can someone help me with making a formula for a cell so that IF A1=X and B1=Y, then C1=Z, or IF A1=X, B1=W, then C1=U, where x is any number between 740 and 760, Y=65-70, Z=-.250, W=71-75, U=-.5.

    i want to make it all in one cell so that base on the first two cell, Cell C would know what value to put in it.

  12. while i am going to apply v lookup its takes/pick up only first value in column, please suggest formula about v lookup or any other function for pick up all value which is in colomn

  13. A B C D
    1 Total A.M P.M OT
    2 0.0 0.0 0.0 0.0

    In A2 I will put total Hours
    In B2 I want first it should be 4 if A2 greater than or equal to 4
    In C2 I want Maximum 4 If A2 is greater then or qual to 8
    In D2 I want remaining if greater then 8 otherwise 0

    • Hello, Atif,
      For me to understand the problem better, please send me a small sample workbook with your source data and the result you expect to get to support@ablebits.com. Please don't worry if you have confidential information there, we never disclose the data we get from our customers and delete it as soon as the problem is resolved.
      Please also don't forget to include the link to this comment into your email.
      I'll look into your task and try to help.

  14. I have this formula:

    =MAX(IF('sheet1'!A:A="Door",'sheet1'!T:T))

    In above formula, it consider the Max in column T, by returning name "Door" in column A.

    Now, if I want to add a date frame (dates in column B in sheet1- formula below), how should I go through:

    'sheet1'!B:B,">="&P2,'sheet1'!B:B,"<="&P3

    P2= Start date
    P3= End date

    Thanks,

    • Hello,

      Please try the following formula:

      =MAXIFS('sheet1'!T:T, 'sheet1'!A:A, "Door", 'sheet1'!B:B, ">="&P2, 'sheet1'!B:B, "<="&P3)

      Hope it will help you.

  15. I have two variables/servies in two columns for sets of client of our organization.

    Some client client received only service A, some have received only B, some have received both services.

    Example
    Service A and Service B

    I want to identify the clients who received "only A", "only B", and "both"

    How i can use the if or and and nested function.

    • Hi Amal,

      The formula depends on how you identify clients who received one or both services. Do you have some mark or specific text in Service A and Service B columns? If a client has not received the service, is a cell in the corresponding column blank?

  16. If CL/ML is 0 gets 10% Bonus,if CL/ML is 1 gets 7%,if CL/ML is 2 gets 5%,if if CL/ML is >2 gets No bonus,and bonus ceiling is 1000,but no ceiling for supervisors and above.

    Please advise how to use if and or formula in excel to show % of Bonus entitlement and Ceiling in Amount cell over 1,000 and use no ceiling for above supervisors?

    It would be a great help if you can solve my problem.

  17. Names Designations Basic Salary CL/ML (Days) Attendance bonus% Attendance Bonus In Amount
    Mr X Worker 14,000 1 7% 980
    Mr Yan Worker 11,500 - 10% 1150
    Mr Raju Worker 15,800 3 0% 0
    Mr Fox Supervisor 16,000 2 5% 800
    Mrs Tusi Worker 13,500 2 5% 675
    Mrs Figoa Supervisor 17,500 1 7% 1225
    If CL/ML is 0 gets 10% Bonus,if CL/ML is 1 gets 7%,if CL/ML is 2 gets 5%,if if CL/ML is >2 gets No bonus,and bonus ceiling is 1000,but no ceiling for supervisors and above.

    Please advise how to use if and or formula in excel to show % of Bonus entitlement and Ceiling in Amount cell over 1,000 and use no ceiling for above supervisors?

    It would be a great help if you can solve my problem.

  18. how to combine this
    if A1=weekday, A2>=3 then minus 0.5
    if A1=weekday, A2=6 then minus 1
    if A1=weekend, A2>=6 then minus 0.5
    if A1=weekend, A2=8 then minus 1

    let say if i work on weekday, i need to deduct 0.5 hour if work >=3 hours but =6 hours

    and if i work on weekend, i need to deduct 0.5 hour if work >=6 hours but =8 hours

  19. My values are in cell A1 & B1 and my condition is If A1>150 and B1150 & B1>75 & B1<=105 then "LTDS", else "REJECT". How can I write condition for this???

  20. Please find below table where I have mentioned the ABC Client and there is 3 quarters of columns where three types of value i.e Completed, #N/A and Not Started, So on that 3 columns basis need to calculate how many times ABC clients GOV completed in Number format

    Client Name Q1 GOV Q2 GOV Q3 GOV No. of Completion
    ABC Completed N/A Not Started
    XYZ Completed Completed N/A
    BCD N/A N/A Completed
    ATD Completed Not Started Not Started

  21. IF(OR(AND(K2="Good",H2-E2<3%),(AND(K2="Bad",E2-H2<3%))),H2-E2,E2-H2)

    Thank you, I managed to get the desired result myself :)

  22. sorry don't know what happened to the previous comment,
    how do I do this in excel ?

    IF(AND(K2="Good",H2-E23%),E2-H2,H2-E2)

    I have been manually copying according to Good or Bad.. would be nice to do this with single statement..

  23. =IF(AND(K2="Good",H2-E23%),E3-H3,H3-E3)

    How do I combine the above into one statement ?

  24. pls any one help me to solve eligiblity criteria of engineering student if more than for back log not elgible that should be shown in seperate column

  25. Hi,

    how to combine this
    if A1=TRUE, A2>=3 then minus 1
    if A1=TRUE, A2=6 then minus 2
    if A1=FALSE, A2>=6 then minus 1
    if A1=FALSE, A2=8 then minus 2

    • Hi Shayna,
      Looks like you need to use a nested IF function with the AND function:
      =IF(AND(A1=TRUE,A2=6),-2, IF(AND(A1=TRUE,A2>=3),-1, IF(AND(A1=FALSE,A2=8),-2, IF(AND(A1=FALSE,A2>=6),-1,""))))
      You can find the details in the first two sections of this blog post.

      • Thank you Irina. You made my day :)

  26. Hi admin, I have a case to count between 2 column where these columns has date format, and each columns has different input,I need to count distance between 2 column with condition where ,ex : A1 to B1 has 4 days distance the result is "Done" Where condition 1 Day = 8 hours , and we have to achieve min 20 Hours to get "done" status.

    Please Help me :(

  27. i need the help with formula below,
    It gives results if the first condition (AND) or last condition is met(VLOOKUP), However, its not working with mid condition WHICH is Value if False

    IFERROR(IFERROR(IF(AND(E913="CR",VLOOKUP($D913,'T (sorted)'!$E:$E,1,FALSE)=SBCLIENT!$D913),"Bank T",IF(VLOOKUP(D913,'Settled Transactions'!$H:$H,1,FALSE)=SBCLIENT!$D913,"Bank D","")),VLOOKUP(D913,'Credit Card Report'!$B:$E,4,FALSE)),"")

    Thank You

  28. Hi there,

    I am looking to write a formula that takes account of the date entered in column A and then returns a room in column B. For instance,

    Thurs 12 Oct (cell A1) would return room 2001 (cell B1)
    Fri 13 Oct (cell A2) would return room 2002 (cell B2)

    I look forward to hearing from you in relation to my query.

    Thanks

    Dan

  29. Thank you so much it helped me a lot.Although I know SPSS, I had no idea about excel coding.

  30. Hi,

    I am trying to do the following:

    If cells H thru P have no dates in them, they all have to be empty, then I need to display all the information from cells B thru G. Otherwise don't display anything. I can use IF/AND for H thru P, but how do I get the formula to return multiple cells of data? Can you help? Thanks.

  31. Hello. I am working on a scheduling spreadsheet that shows employees names in Column A and has 15 minute intervals throughout the day from 8:00 AM - 10:00 PM(8 AM, 8:15 AM, 8:30 AM, 9:00 AM, etc.) in Row 3.

    I have in Columns C and D the Agent's Start and Stop times for their shift. I have already worked out that if I write the following formula in the 8:00 AM interval =IF(AND(K$3>=$C5,K$3<=$D5),1,IF(K$3=$E5,"B",IF(K$3=$H5,"B"))), then it will put a "1" in any hours that are equal to or greater that the start time AND less than or equal to the ending time.

    I want to take this a few steps further and show that if I have the agent's break time listed in Column E and their lunch start time and lunch stop time listed in Columns F and G, that it will return a B from the interval when the employee is on Break or an L when on Lunch and display something like this:

    8AM 8:15AM 8:30AM 9:00AM 9:15AM 9:30AM
    1 1 B 1 1 L

    How can I write the formula within my original formula to do this?

    Thanks,
    Larry Spencer

  32. Hi,

    I just wanted to put a formula in excel
    if condition is fulfil then Current date (which should not be changed on next day ) for ex:- if(cell A=Resolved then Current Date
    I have tried with "today" and "now" formula date is ok but it is going to changed on next day, once i open the worksheet,i want the date of resolved.

  33. Hello -

    I am looking for a formula that would calculate service pricing which is discounted after many hours.

    We could enter the total hours worked and the corresponding rate would appear.

    The list would look something like this:

    Total hours: _______
    Adjusted Price per Hours: _____

    Hours Rate
    1 $125
    2 $125
    3 $125
    4 $125
    5 $100
    6 $100
    7 $100
    8 $100
    9 $80
    10 $80
    11 $80
    12 $80
    >13 $50

    Can you help?

    Thanks!

    • Thanks for you comment to Daniel above. I was able to figure it out.

  34. Hello,

    I'm looking for some advice on using the if function.
    Suppose there are two digit in two columns i.e. 24 & 42 and i need the maximum value in other column using if formula.

    Example - if 24<42 then they put 42 in the column

    Any advice on this would be great! :)

  35. Hi
    Is there a formula for the following example :
    In collumn C I have the shelf life in months. Ranging from 1-100 .
    In column D I have values ranging from 1-100.
    What formula would i use to mark a cell within a range of the value in C. If C is 48 and D is between 46-50 .It will mark true if true and False if false ?

  36. Looking to show a result (pass/improve/Fail against a range of numbers in the same formula, how can I do this, the range is
    0 to 70 = fail
    71 to 89 = improve
    90 to 100 pass

  37. does the multiple if,then,else function apply the same in pseudocodes and programs ?

  38. PLEASE HELP I WANT TO APPLY A FORMULA =ROUND(IF(K2="kurta pajama",IF(M2>1000,SUM(M2-M2*12/112),IF(K2="kurta pajama",IF(M21000,SUM(M2-M2*12/112),IF(K2="kurta pajama",IF(M2<=1000,SUM(M2-M2*5/105),

    BUT WHEN I ADD ONE MORE EQUATION WITH UPPER FORMULA
    IF(K2="Fashion",SUM(M2-M2*12.5/112.5) THEN ITS GONE 0 PLEASE HELP ME

  39. Hi Natalia,

    I need an IF formula for commission rates, Can you take a look at this and see if it can work?
    =IF(B7=100%,B13, IF(B7>=110%, B14, IF(B7>=120%, B15, IF(B7>=130%, B16, IF(B7>=140%, B17, IF(B6>=150%, B17)))))))
    B7 shows the target achieved
    B12 - B17 shows the commission rates.

    I'd really appreciate your help :)

    • I think that I've got it with this.
      Commission rate selector.
      =IF(B7>=150%,B18, IF(B7>=140%,B17, IF(B7>=130%,B16, IF(B7>=120%, B15, IF(B7>=110%,B14, IF(B7>=100%,B13,B12))))))

  40. =ROUND(IF(K2="kurta pajama",IF(M2>1000,SUM(M2-M2*12/112),IF(K2="kurta pajama",IF(M21000,SUM(M2-M2*12/112),IF(K2="kurta pajama",IF(M2<=1000,SUM(M2-M2*5/105),
    BUT WHEN I ADD LAST IF(K2="Fashion",SUM(M2-M2*12.5/112.5) THEN ITS GONE 0 PLEASE HELP ME

  41. Hello,

    I need to right a statement to sum the total of something based what's put in a cell.

    So I have a range of cells B3:B52 and you can only enter the numbers 0-6 in them.
    Depending on what is input, we need a certain number:
    0=0
    1=90000
    2=128000
    3=185000
    4=261000
    5=356000
    6=470000

    Once those have been input I need to sum the total of the output in the range of cells.

    I can't figure out how to do this.

    Thanks in advance!

    • Hello, Ryan,

      if you feel confused by the article above, please learn the basics of the IF function from another article of ours. When you understand what arguments should be present in the formula, you will be able to construct a nested IF :)

      Also, to sum the total in the range of cells, please take a look at these multiple options Excel offers :)

  42. Hi,
    Please help me with the formula to calculate the suitable truck type with the number of trucks to be required day wise load whether in terms of weight or volume.

    Capacity in Weight Capacity in Volume
    Truck 1 800 124
    Truck 2 4,000 643
    Truck 3 6,500 791

    Day Weight Volume Best Suitable Truck type with
    Number's
    01 18.42 3.88
    02 114.19 20.33
    03 3839.27 687.71
    04 528.89 110.44
    05 994.62 200.43
    06 1991.78 204.43
    07 1739.71 406.00

  43. Dear Sir And Mam

    Would please provide if formula with multipal currency usd ,inr, eur, using of sumif so i can view statement in three currency through datavalidation.

    Please help ASAP

    Regards
    Palakkumar jain

    • Dear Palakkumar,

      there's no special formula to display currency. All you have to do is to apply a correct number format to the cells.
      Please read this point of the related to formatting article to see how it's done.

      Hope you'll find the info useful.

  44. I am trying to use a formula to pick a specific field but can seem to get it working

    I am using a drop-down so there will be no false

    =IF(K9="Tier 4",Data!A2,IF(K9="Tier 3",Data!A4,IF(K9="Tier 2",Data!A6,IF(K9="Tier 1",Data!A8))))

    • Hello, Steve,

      As far as I can see from your formula, it misses one argument at its very end. Please bear in mind that IF function requires 3 arguments.
      I kindly ask you to take a look at this article to find our what you're missing :)

  45. In trying to search for my answer, this is the closest article/thread I came across, but still having trouble. Is what I want to do possible?

    I have 3 cells:
    cell A1: Negative, postiive, or 0 # value
    cell B1: Negative, positive, or 0 # value
    Cell C1: Formula

    I am trying to generate a response in words using an IF formula, conditional to the values in cells A1 and B1, dependent on if the cell has any value besides 0.

    Basically, if cell B1 is 0, then do =if(B1<0,"Word","Other word"), otherwise do =if(A1<0,"Word","Other word")

    Hope this makes sense.

  46. Hello,
    I have gotten this formula to work to a degree, but I want the result of the column to be blank if there is not data in cell E2 but I don't know how to add that to this formula.I have tried several things but to no avail.

    =IF(ISBLANK(F2)=FALSE,"COMPLETED",IF(E2-TODAY()>1,"IN PROGRESS",IF(TODAY()-E2>1,"OVERDUE","")))

    help please :)

    • Hello, Kristina,

      If I understand your task correctly, I would suggest adding one more IF to your nested formula, at the very beginning:
      IF(E2="","",IF(ISBLANK(F2)=FALSE,"COMPLETED",IF(E2-TODAY()>1,"IN PROGRESS",IF(TODAY()-E2>1,"OVERDUE",""))))

      Hope this is what you need.

      • Thank you, that is exactly what I needed! I appreciate your prompt response.

  47. Hi, I work for an organization did a survey recently and I need a formula to calculate number of YESs from male and female in a separate manner.
    Here is the story. In the excel sheet I developed, there is a column counting the number of male and female and there is another column counts number of YES and NO answers for each questions received from both gender. Now, I need a formula to count number of YESs received from females separate and from male separate.

  48. Hey every body
    I'm trying to make a formula that converting 2 combinations of texts in to a number, saying like this:
    if(and((V6="Good";W6="Good");(V6="Good";W6="Poor");(V6="Poor";W6="Good");(V6="Poor";W6="Poor"));("1"; "2"; "3"; "4")

    Thanks for help

  49. I need a formula
    if an amount > 400000 and >500000 then 2% of exceed amount

    • >400000 and <500000
      Greater then 400000 and less then 500000

  50. hi! need help
    IF item count is 0 to 15 and YES then 1
    if item count is 0 to 15 and YES then 1
    if item count is 16 to 30 and YES then 2
    if item count is 16 to 30 and NO then 3

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