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)

4538 comments

  1. Hello,
    I have a medical insurance cost comparison. Using data from multiple insurance quotations, with a number of factors to consider (Age, Gender, Salary and insurance Category), what formula would I have to use to return the cost in a specific cell (costing data found on a secondary worksheet, within the same workbook)? For example, Employee A is 30 years old, Single Male earning $4,070 per month and is entitled to Category B Insurance the cost from Insurer 1 = $6,696 per annum

  2. can anyone please help me with this.
    assume i have different data in A1 like 12ABCD999 OR 45JKLM888 OR 78MNOP111 and many more. now i want if value of first 2 number of A1 starts with 12 then my output should be "OK" and if value of first 2 number of A1 starts with 45 then my output should be "GREAT" and if value of first 2 number of A1 starts with 78 then output should be "FANTASTIC".
    Thank you.

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

      =IF(--LEFT(A1,2)=12,"OK",IF(--LEFT(A1,2)=45,"Great",IF(--LEFT(A1,2)=78,"FANTASTIC","")))

      I hope this will help

  3. Hi,
    Can anyone help me with this formula? I've been trying to create a Nested IF OR but just can't get it to work. I have a table with "Team" as a column heading in column A. I've added column D to the table for the office group. If column A is ftl, gai, or orl then column D should be fl. If column A is glf or nol then column D should be gcn. If column A is atl then column D should be geo. This is my formula but the result is always #VALUE!. Please help!
    =IF(OR([@Team]="ftl",[@Team]="gai",[@Team]="orl"),"fl"),IF(OR([@Team]="glf",[@Team]="nol","gcn"),IF(OR([@Team]="atl","geo"))

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

      =IF(OR(A1="ftl",A1="gai",A1="orl"),"fl",IF(OR(A1="glf",A1="nol"),"gcn",IF(A1="atl","geo","")))

      or IF function can be replaced with INDEX + MATCH functions

      =IFERROR(INDEX({"fl","fl","fl","gcn","gcn","geo"},MATCH(A1,{"ftl","gai","orl","glf","nol","atl"},0)),"")

      I hope it’ll be helpful.

      • You're a Genius! I used the Index Match and it works perfectly! I never would have figured it out on my own. Thank you so much!!

  4. HI there I have inherited a daily cash reconciliation file which was updated manually on a daily basis. I'm trying to automate or create a formula and was wondering whats the best way to approcah this. So I have a list of transactions which I need to separate by Deposits, Wires Rcvd, Incoming Transfers, (Checks/wires)Paid, & Outgoing Transfers. Thank you!

      • Post Date Check Description Debit Credit Status Balance Keyword Categories
        07/24/2020 SHINE MEDICAL CORP PAY VALCOR ENGINEERING 21022.00 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) SHINE MEDICAL CORP PAY VALCOR ENGINEERING WIRE
        07/24/2020 TA INSTRUMENTS-W DIR-DEPT VALCOR SCIENTIFIC 7200.00 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) TA INSTRUMENTS-W DIR-DEPT WIRE
        07/24/2020 ORBITAL SCIENCES EFT ID: 400742 0005VALCOR ENGINEERI 705ISA*00* *00* 25594.00 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) ORBITAL SCIENCES EFT WIRE
        07/24/2020 THE BOEING CO BCAGPAYSVC ID: 0006433532 0011VALCOR ENGINEERI 705ISA*00* *00* 16480.00 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) THE BOEING CO BCAGPAYSVC WIRE
        07/24/2020 UNEX DISB PAYABLES ID: VALCOR VALCOR ENGINEERING COR 705 10878.00 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) UNEX DISB WIRE
        07/23/2020 108572 CHECK NUMBER 108572 1245472250 972.10 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) CHECK NUMBER CHECKS PAID
        07/23/2020 108341 CHECK NUMBER 108341 1245598400 10553.34 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) TRANSFER TO CK# 41337204 OUTGOING TRANSFER
        07/23/2020 TRANSFER TO CK# 41337204 826257.04 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) PRINCIPAL LIFE WIRE
        07/23/2020 PRINCIPAL LIFE P PLIC-PERIS ID: 7-1454400004529 NO NAME ON FILE 76421.81 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) Medivators Inc. EDI PYMNTS WIRE
        07/23/2020 PRINCIPAL LIFE P PLIC-PERIS ID: 7-1454400004530 NO NAME ON FILE 9064.99 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) MERCHANT BANKCD DEPOSIT DEPOSITS
        07/23/2020 PRINCIPAL LIFE P PLIC-PERIS ID: 7-1454400004528 NO NAME ON FILE 1750.00 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) Accessory Tech WIRE
        07/23/2020 Medivators Inc. EDI PYMNTS ID: 01-102020000123 0012VALCOR ENGINEERI 705ISA*00* *00* 96770.50 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) PARKER EDI/ACH WIRE
        07/23/2020 MERCHANT BANKCD DEPOSIT ID: 447201760884 VALCOR ENGINEERING COR 6255.50 Posted =INDEX(K2:K15,MATCH(TRUE,ISNUMBER(SEARCH(J2:J15,C2)),0)) NORTHROP GRUMMAN EFT PMT WIRE

        Hi Alex, I'm trying to create a Index formula for where it returns the category of the expense but unfortunately it's not working properly could you please assist?
        Thanks,
        Anees

        • Hello!
          I'm sorry, it is not very clear what result you want to get. Could you please describe your task in more detail and send us a small sample workbook with the source data and expected result to support@ablebits.com? Please shorten your tables to 10-20 rows/columns and include the link to your blog comment.

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

  5. This formula result: #VALUE!.
    =IF(OR(AND(A4="APPLE",B4="ORANGE"),"DRINK",IF(AND(A4="BREAD",B4="BUTTER"),"EAT")))
    Could you please fix it? The expected result is: DRINK, BUTTER, OR FALSE (either one).
    Thank you in advance.

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

      =IF(AND(A4="APPLE",B4="ORANGE"),"DRINK", IF(AND(A4="BREAD",B4="BUTTER"),"EAT"))

      I hope it’ll be helpful.

      • Thanks a lot, Alexander.
        It works perfectly!
        Have a nice day.
        Cheers,

  6. Hi,
    Can anyone please help me with my formula.
    I need "Yes" or "No" answer if the number in cell matches a number from any cell in another selected field. These two i have tried so far, but no luck.
    And sorry, my excel is in German.
    =WENN(A13=Tabelle1!A2:A29;"ja";"nein")
    =WENN(B16="SVERWEIS('INT-B-106 Kennzahlen nach Artik'!A13;Tabelle1!A:A;1;Tabelle1!A:A)";"ja";"nein")

    Thanks for help and have a great day!

    • Hello!
      I propose to use the following formula (in English):

      =IF(SUM(--(IF(A13=Tabelle1!A2:A29,1,0)))>0,"yes","no")

      I hope this will help

  7. I need help in finalizing this formula. =IF(AND(L10>=1,L10<=10),250,SUM(L10-10)*11+250), IF(L10<1,0,""). The formula works great up to the last IF statement. I am needing it to return 0 if L10 is less than one or in other words equal to zero.

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

      =IF(AND(L10>=1,L10<=10),250,IF(L10<1,0,SUM(L10-10)*11+250))

      I hope this will help

  8. Good Morning,
    Please assist, I am struggling with the formula below.
    =IF(Z5>Y5,Y5*30%,IF(Z50,Z5*0%)))
    X Y Z AA
    Tax @25% Tax @25%
    200.00 2,100.00 3,800.00 630.00
    200.00 2,100.00 800.00 240.00
    200.00 2,100.00 3,800.00 630.00
    0.00 2,100.00 -5,400.00 -1,620.00
    200.00 2,100.00 3,800.00 630.00
    0.00 2,100.00 -5,400.00 -1,620.00
    I want Cell AA to be zero if the value in cell Z is less than 1

    • Hello!
      The numbers in your table do not match the conditions in your formula. Therefore, your calculations are not very clear to me. However, it may be useful to you.

      =IF(Z5>Y5,Y5*30%,IF(Z5<1,Z5*0%))
      =IF(AND(Z5>0,Z5>Y5),Y5*30%,0)

  9. Hi,
    Following is an example of a data sheet with the 4 columns(A, B, C, D).The values in first three columns correspond(match) to each other but in Column D values are randomly located in different rows even though the column is sorted. I need to find out the correct value that corresponds to the value of Start and stop in each row. For example, there is a value in "Position" column that falls between the range of start(3904) and stop(4943) in first row but do not know how to find it?
    Genesymbol Start Stop Position
    Mt-nd2 3904 4943 471
    Mt-atp8 7758 7962 635
    Ppil4 1897338 1929764 645
    Mib1 1970914 2094921 665
    Arrdc1 2129879 2136937 685
    Hspa1a 2699712 2701816 2924
    Glmn 3204390 3247696 2959
    Ncoa2 5616483 5694599 3130
    Slc7a1 8032809 8108973 3140
    Vcpip1 9230984 9257935 3145
    Uimc1 10065947 10130908 3166
    Wasf3 10298555 10391271 3196
    Secisbp2 13555349 13586555 3211
    Fam98a 21051327 21065987 3418
    Samd4a 23665202 23878540 3560
    Gfod1 23823632 23923793 3575
    Npy1r 24779477 24788741 3581
    Hars2 29629184 29638722 3808
    Pcdhb5 30398113 30400696 3860
    Ddx50 32239748 32269146 4055
    Zfp827 32401661 32528966 4252
    Epc2 33641616 33740462 4375
    Tmem132b 35970821 36398247 4600
    AABR07001068.1 37059412 37162590 4708
    Rmnd5b 37073345 37084638 4920
    Fbxo8 37131345 37177034 6331
    Dpysl2 43477629 43542940 7474
    AABR07072400.1 43694183 43694612 7568
    Ugdh 44479614 44502846 7606
    Lias 44507218 44524253 7663
    Tenm3 46731403 46926246 7699
    Senp7 46880928 47027668 7711
    Amph 48304322 48562906 7898
    Pnrc1 48501472 48504512 7925
    Scn2b 49418965 49427690 8025
    Ctc1 55596148 55616890 8040
    Ndst1 55955389 55992886 8115
    Phf23 56605140 56609234 8255
    Tlk1 57013025 57119002 8271
    LOC103690017 57318795 57389902 8308
    Pigo 58461759 58469400 8351
    Mcart1 60944563 60955944 8377
    RGD1305464 61913589 61919875 8394
    Cdh6 63101739 63166510 8441
    Dip2c 63635086 63808465 8483
    Luc7l2 66290389 66354712 8534
    Cyp20a1 67130259 67179693 9260
    Cxxc1 70192493 70197868 9298
    Rasal2 74771522 75059327 9310
    Zswim9 75335894 75354821 9544
    Ppp2r2c 78679214 78902064 9574
    Xrcc5 79659251 79748079 9593
    Irgq 81395841 81399673 9646
    Plcd4 81816872 81844365 9658
    Bcs1l 81868265 81872198 9684
    Limk2 83573928 83641893 9763
    Ick 85413537 85472695 9832
    Pip4k2b 85658324 85684139 9937
    Zmiz2 86652365 86661442 10077
    LOC100360491 86751157 86751793 10125
    AABR07019085.1 87404841 87450320 10298
    Stat5b 88686207 88754830 10334
    Itpkb 98615287 98708150 10790
    Neu4 101284902 101290559 10820
    Dusp10 104284660 104321456 10992
    Prpsap1 105430520 105452229 11834
    Armcx5 106253355 106255059 12021
    Nek9 109124330 109162268 12621
    Mrpl12 109658032 109662536 12762
    Zfp638 115601661 115690273 12786
    Ccdc51 117812099 117830869 12802
    Nup210 122644135 122741111 12858
    Xrcc6 123259761 123280613 12876
    Rtl6 125465117 125465849 12921
    Lurap1 134991997 135001721 12935
    Arid2 137680530 137795656 12948
    Zfp133 138597638 138616132 12975
    Dzank1 138624555 138683319 13006
    Noct 140286661 140306870 13020
    RGD1561327 144445795 144447448 13039
    Ret 150202058 150244373 13099
    AABR07054400.1 152402520 152465229 13336
    Epb41l1 153843206 153893848 13551
    Ing4 157554794 157563353 13580
    Vwf 158088505 158219524 13637
    Oser1 159784128 159802953 13699
    Snx21 161252723 161264819 13826
    Lrp6 168194927 168323752 13916
    Ints13 180855800 180887051 14003
    Tmtc1 182625386 182844292 14149
    Snapin 189878168 189880744 14193
    Wdr3 202447745 202470400 14202
    Rap1a 208193954 208215188 14235
    LOC100911730 214009784 214013766 14706
    LOC100911881 214039481 214074664 14775
    Tspan4 214454090 214473742 14910
    Chid1 214476387 214511530 14970
    LOC108348052 220307394 220314036 14980
    LOC102553088 230476320 230479595 15009
    Alpk1 231996088 232117135 15073
    Jak2 247398598 247458510 15088
    AABR07007121.1 282063929 282064742 15150
    Any help will be appreciated.Thanks!

    • Hello!
      You want to find the values in the "Position" slider, which are between the Start and Stop values. Between 3904 and 4943 there are values 4055.4252, 4375, 4600.4708 and many others. Explain which one you want to find?

  10. Hello,
    I have the following statement that works.
    =IF(OR(G6 = "high", H6 = "high", I6 = "high", J6 = "high"), 0.3*F6, F6)
    I now want to have the statement to look for a "medium" value in each of those cells and if it is a "medium" it would multiply F6 by 0.6 otherwise it would return F6 unchanged.
    If "high" it would multiply F6 by 0.3
    If there is a "high" in the string then it would ignore any medium.
    Thanks!

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

      =IF(OR(G6 = "high", H6 = "high", I6 = "high", J6 = "high"), 0.3*F6, IF(OR(G6 = "medium", H6 = "medium", I6 = "medium", J6 = "medium"), 0.6*F6, F6))

      I hope this will help

      • Perfect! thanks!

  11. Hi is someone is able to help
    I need help with an IF formula
    I need help with, if the value in cell A1 sheet1 is + or - 10 of another cell in another sheet say Sheet2 cell A1 if yes then equals Cell B1 in sheet2 .

    hope this make sense thank you in advances

    • Hello Glenn!
      I hope you have studied the recommendations in the above tutorial. Explain what "value in cell A1 sheet1 is + or – 10 of another cell in another sheet" means?

      • Hi Alexander,
        I have studied the above tutorial I do understand how to calculate if cell A1 is within + or - 10 of Cell B1, but it is when it comes to the result I don't want it to equal good or bad I want it to if it falls within that + or - 10 I want it to equal another cell C1 but if it doesn't fall within it is a fail.

        • Hello Glenn!
          If a value is written in cell A1, then the formula can no longer be written to it. This has already been discussed on the forum many times. So your question about the formula in cell A1 does not make sense. Only VBA Macro Can Solve the Problem

          • Hi Alexander,
            Apologies I should have explained my situation better and included my formula.
            the formula I am running is =IF(ABS(A1-B1)<=C1,"ok","Fail") but instead of if the result is ok it equals a number in cell E1

  12. Can I find the same for time ???
    I means if my difference in time is greater than 10 mins and my task done within 10mins
    If yes can you explain the formula

    • Hello!
      I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
      It’ll help me understand it better and find a solution for you. Thank you.

  13. I tried several IF formulas but I am not getting the desired output. Please can you help me provide the appropriate formula to get the output.
    There are the conditions: (if the number is between 1 and 20, the value should be 3)
    1-20 figs - 3 days
    21–100 figs – 5 days
    101–200 figs – 8 days
    201–400 figs – 12 days
    401–600 figs – 14 days
    Please help.

  14. Hello,
    I am trying to understand the correct formula for my project. My goal is to develop an IF statement for the following. If the number in column C is within a range it gets a score of 6-8.

    Score Legend
    1-50,000,000 Scores a 6
    50,000,001 – 100,000,000 Scores a 7
    100,000,001 – 500,000,000 Scores an 8

    Column C Score Column D Score
    400,000,000
    85,000,000
    48,000,000

    I keep getting errors with different formulas. Any help would be greatly appreciated.
    Thank you!!
    Tanner

    • Hello!
      I hope you carefully read the article above. If I understand your task correctly, the following formula should work for you:

      =IF(AND(A1>1,A1<50000000),6,IF(AND(A1>50000001,A1<100000000),7, IF(AND(A1>100000001,A1<500000000),8,0 )))

  15. Hi there, I'd like some more insight into making this formula work for me. I'm doing a training matrix where I need to know if by today's date someone training has expired or about to expire..

    I have so far:
    =today()

    • =today() and =today()+30 for expiry in 30 days (between)
      =today()+30 (greater than)
      Would this work?

    • Hello Celina!
      I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
      It’ll help me understand it better and find a solution for you. Thank you.

  16. If income is
    Up to Rs. 7,500 Nil (for male)
    From Rs. 7,500 to Rs. 10,000 Rs. 175 (for male)
    Rs. 10,000 onwards Rs. 200 (for male)
    Up to Rs. 10,000 Nil (for female)

    • If income is
      Up to Rs. 7,500 then tax will be Nil (for male)
      From Rs. 7,500 to Rs. 10,000, tax will be Rs. 175 (for male)
      Rs. 10,000 onwards, tax will be Rs. 200 (for male)
      Up to Rs. 10,000 tax will be Nil (for female)
      Above Rs.10,000 tax will be Rs.200 (for female)

      • Hello,
        Below formula should work for you... if the values Sex and Salary are assumed to be in the cells D3 and E3 respectiely...
        =IF(AND(D3="Male",E37501,E310000),200,IF(AND(D3="Female",E310000),200,"")))))

  17. Hi,
    I hope you are well! I just need a quick tip with my formula:
    I need to create a forumla which says IF column F has the word TOR then collumn E must have 100. If it has 100 it displays "correct" if it is less/more than then it displays "incorrect".
    I.E: F=TOR E=100 COLUMN H: CORRECT
    I.E: F=TOR E=90 COLUMN H: INCORRECT

    This is just one part of the formula, how would I then add an additional/multiple rules which also displayed same result.
    For example, if I had the words TOR, TOR1, TOR2, TOR3
    TOR = 100
    TOR1 = 200
    TOR3 = 300
    How can I get column F which contains the word TOR/TOR1/TOR2 etc to match the correct value assigned to it in column E

    I.E: F=TOR E=100 COLUMN H: CORRECT / F=TOR1 E=200 COLUMN H: CORRECT
    I.E: F=TOR E=99 COLUMN H: INCORRECT / F=TOR1 E=199 COLUMN H: INCORRECT
    I hope this explains it well enough. Really appreciate the support!

    • This is what I have so far but it is constantly displaying "Wrong" in the cell:

      Wrong
      =IF(AND(E9="80.00 UK",F9="TOR",OR(E9="100.00 UK",F9="TOR1",OR(E9="150.00 UK",F9="TOR2"))),"Correct","Wrong")

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

        =IF(OR(AND(F6="TOR",E6=100), AND(F6="TOR1",E6=200), AND(F6="TOR3",E6=300)),"Correct","Wrong")

        Hope this is what you need.

        • You are an absolute genius! Exactly what I needed!!

          I just need to keep adding the AND section for additional criteria, thank you so much you have saved hours of mine and my colleagues time! Thank you so much again!

  18. Hello,
    Can you help me with a formula which return the value as "Qtr 1, Qtr 2, Qtr 3, Qtr 4' based on the month entered in a cell.
    eg. if Column B as value as Feb, Apr, Jul, Dec in cell B1, B2, B3, B4, in column C the result should be as Qtr 1, Qtr 2, Qtr 3, Qtr 4.

    Thanks

    • Hello!
      If I got you right, the formula below will help you with your task:

      ="Qtr "&ROUNDUP(MONTH(DATEVALUE("1/"&B1&"/2020"))/3,0)

      I hope this will help

  19. This is what I see:

    W Z AG (Results) '=IF(W55000, W5-5000))
    Taxable Amt Non Taxable Amt Over $5000.00 Exempt Amt
    0 $377.50 0
    $2,848.45 $573.90 0
    0 $1,600.35 $(5,000.00)
    0 $12,478.32 $(5,000.00)
    0 $13,864.08 $(5,000.00)
    $9,314.72 $- $4,314.72
    $13,320.09 $- $8,320.09

    When I put your formula in Column it gives the same results:

    Column AG
    Over $5000.00 Exempt Amt
    $(5,000.00)
    $-
    $(5,000.00)
    $(5,000.00)
    $(5,000.00)
    $4,314.72
    $8,320.09

    so not sure why it is ignoring that if column W is zero then Column AG ought to be zero.

    Hope this helps with the explanation.
    Thank you for helping,
    Kathi

    • Hello Kathi!
      The formula I sent to you was created based on the description you provided in your first request. However, as far as I can see from your second comment, your task is now different from the original one. Please note that if you’d provided me with the precise and detailed description of your task from the very beginning, I’d have created a different formula that would have worked for your case.

  20. Attempting to create a formula to show once case record. If it is a zero, then fail, if it a 1, then pass. Data below shows duplicate case records, need to show that if one of the cells to the left of case record is a zero, then the whole case record is a fail, and if they are all ones, then it is a pass. However, don't need the case record to show as a duplicate, only one case record. Thoughts?
    Right the First Time CaseRecordID
    0 28018598
    0 28018598
    1 28018598
    1 28018598
    1 27986560
    1 27986560
    1 27986560
    1 27986560
    1 28008880
    0 28008880
    1 28008880
    1 28008880
    1 28008920
    1 28008920
    1 28008920
    1 28008920
    1 28038434
    1 28038434
    1 28038116
    1 28038116
    1 28038116
    1 28038116
    1 28038434
    1 28038434

    • Hello!
      If I got you right, the formula below will help you with your task:

      =IF(SUMPRODUCT(--($C$1:$C$28=C17), --(IF($B$1:$B$28=0,-9999999999,1))) > 0,"pass","fail")

      After that you can copy this formula down along the column.

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