Comments on: Excel IF statement with multiple conditions

For powerful data analysis, you may often need to build an Excel IF statement with multiple conditions or use IF together with other functions. This tutorial will show you the most effective ways to do this. Continue reading

Comments page 28. Total comments: 4557

  1. If in a column range is Safdar and in next column his number is 6 which formula can tell me that if in that range Safdar exist then bring his number 6

  2. Hello! I am trying to solve for the correct way to use IF and VLOOKUP when:

    IF H5 refers to "Basic Monthly", "Plus Monthly", "Elite Monthly" (I'd like these to just result in "Monthly" for the VLOOKUP. Same format exits for Annual portion of the formula.

    VLOOKUP Table Example (monthly rate table):
    $1.00 $5,000.00 10%
    $5,001.00 $10,000.00 15%
    $10,001.00 $99,999.00 20%

    I've tried variations of the following:
    '=
    IF($H5="Monthly",
    VLOOKUP($L5,'Direct Sales Commission Tables'!$A$26:$C$28,3,TRUE),
    IF($H5="Annual",
    VLOOKUP($L5,'Direct Sales Commission Tables'!$E$26:$G$28,3,TRUE),
    IF($H5="NA",0)))

    Thank you for any guidance!

    1. Hello!
      Use instead $H5=”Monthly”
      formula

      ISNUMBER(SEARCH("Monthly",$H5,1))

      I hope it’ll be helpful.

  3. Hello,

    I would like to create a formula for three test conditions with dates, but I'm having trouble with adding the dates. This is the formula I would like:

    If test priority is "High" (A1), add one week from initiated date (B1) to due date (C1)
    If test priority is "Medium" (A1), add two weeks from initiated date (B1) to due date (C1)
    If test priority is "Low" (A1), add three weeks from initiated date (B1) to due date (C1)

    Thank you!!

  4. Im trying to do a formula to calculate for me result if I multiply the rate with the consumption but based on different ranges or slabs each range with different rate;
    1) if equal or more than 2000kwh calculate for me: x*rate 1
    2)if more than 2000 but less than or equal 4000 : x*rate 2
    3) if more than 4000 : x*rate 3

  5. Hello,
    May i know how to combine below formula in 1 formula? Thank you very much!

    =IF(ISBLANK(J1793),"",IF(WORKDAY.INTL(J1793,-4,1,holiday!A:A),WORKDAY.INTL(J1793,-3,1,holiday!A:A)))
    =IF(ISBLANK(J1800),"",IF(OR(WEEKDAY(J1800,2)=6,WEEKDAY(J1800,2)=7),WORKDAY(J1800,-5,holiday!$A:$A),WORKDAY(J1800,-4,holiday!$A:$A)))
    =IF(ISBLANK(J1801),"",IF(OR(WEEKDAY(J1801,2)=6,WEEKDAY(J1801,2)=7),WORKDAY(J1801,-4,holiday!$A:$A),WORKDAY(J1801,-3,holiday!$A:$A)))

    1. Hello!
      The terms in these formulas are not related to each other. All of them can be performed at the same time. If ISBLANK(J1793), ISBLANK(J800) and ISBLANK(J1801) return TRUE at the same time, which condition will you fulfill? Therefore, your desire cannot be fulfilled.

  6. Hi I'm having trouble writing a formula, where if there's a date entered in cell AG2 for the text "Closed" to be entered automatically, and the same for AD2 and E2, but with differing text. Otherwise to leave the cell empty.
    But I can't seem to get it to work, as it returns an empty cell, even though there's dates in these cells.
    However for some reason, if I take the asterisk out of the quotations it'll enter the text for the cell without anything in (which shows it does kind of work, just not the way I want it to). I'm probably doing something wrong here, could you have a look and adjust it if possible?

    =IF(AG2="*","Closed",IF(AD2="*","Awaiting Sign Off",IF(E2="*","Open","")))

    Thank you

    1. Hello!
      Please try the following formula:

      =IF(AG2<>"","Closed",IF(AD2<>"","Awaiting Sign Off",IF(E2<>"","Open","")))

      I hope it’ll be helpful.

      1. Works perfectly. Thank you for the fast response.

  7. Is it possible to create an IF formula that writes different results (separated with a comma) in the same cell? for example, let's say
    A2 = #10 031
    A4 = #15 213
    A1= 0
    A4= 0
    If A1 is equal to "1" do not write anything but if A1 is equal to "0" then result is equal to A2
    If A3 is equal to "1" do not write anything but if A1 is equal to "0" then result is equal to A4
    If.... continues

    then the formula should write in the same cell =
    #10 031, 15 213

    I don't know if I am making myself clear xD, any master out there who knows if its possible?

      1. oh :c
        I will try to work around that,
        thanks a lot, you saved me a lot of time.

    1. My bad
      A2 = #10 031
      A4 = #15 213
      A1= 0
      A3= 0

  8. I am looking to solve this formula - where X is a variable (% performance)
    IF(X80100150,550000)))))

    what am I doing wrong?

    1. Sorry this was captured wrongly. Here are the conditions:

      % performance Award
      150% 550,000.00
      >100%80%<100% 250,000.00
      <80% -

  9. I need help to get an appropriate formula for my table.
    The table headers have A remark(Suppressed, Unsuppressed), B indicator(Routine, Targeted), C (Date of Result), and D (Next due date)
    I want the following to happen,
    1) If (A2) is Suppressed and (B2) is Routine, (D2) should add 11 months from (C2) date.
    2) If (A2) is Suppressed and (B2) is Targeted, (D2) should add 5months from (C2) date.
    3) if (A2) is suppressed and (B2) is either Routine or Targeted, (D2) should add 3months from (C2) date.

      1. Thank you, Alexander. You are a genius. This is the modification I made from the formula you gave me
        =IF(A2="SUPPRESSED", IF(B2=TARGETED", DATE(YEAR(C2), MONTH(C2)+5,DAY(C2)), IF(L6="SUPPRESSED", IF(B2="ROUTINE", DATE(YEAR(C2), MONTH(C2)+11,DAY(C2))), C2))).
        It works. However, my No 3 condition should be (A2) is "unsuppressed" and (B2) routine or targeted.

        1. Hi!
          If condition 3 is satisfied, then conditions 1 and 2 are satisfied. You cannot perform 3 actions at once.

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

  11. Hi Friends,

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

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

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

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

        eg:

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

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

        So how to use cell value instead of any number

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

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

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

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

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

  14. Can someone assist please?
    I have the following

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

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

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

    Thanks ...

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

      =CHOOSE((A1<>"")+(B1<>"")*2+(C1<>"")*4,"NV","","NV","","NV","","FV")

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

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

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

      =IF(AND(WEEKDAY(D1,2)=2,(D1-INT(D1)>19.5/24),(D1-INT(D1)<22.5/24)),"ABCZYZ","")

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

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

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

        Thanks,
        Jasmeet Singh

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

            Thanks,
            Jasmeet Singh

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

              =IFERROR(INDEX(D1:D12,MATCH(1,(INT(F1)=A1:A12)*(F1>A1:A12+B1:B12)*(F1<A1:A12+C1:C12),0)),"")

              Please check out this article to learn how to use IFERROR in Excel.

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

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

                =IFERROR(INDEX(D2:D12,MATCH(1,INT(K2)=A2:A12)*(K2>A2:A12+B2:B12)*(K2<A2:A12+C2:C12),0),"REVIEW")
                It only shows "REVIEW".

                Please help to fix this.

                Thanks,
                Jasmeet Singh

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

            2. Hi Alexander,
              Apologies to pester you.

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

              Thanks,
              Jasmeet Singh

  16. Hi,

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

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

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

    Thanks,
    Betty

    1. Hello!
      Unfortunately, without seeing your data it is difficult to give you any advice. The formula contains no errors. But I cannot check its work, sorry.

      1. Hello again,

        I got it to work! Thanks so much for publishing this article.

      2. Do you need to see the excel file? If so, how do I send it to you?
        Thanks

  18. Hey Hi,

    i have some doubts,

    if john and peter 2 peoples is available

    john is 10
    peter is 10

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

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

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

    1. Hi!
      I hope you have studied the recommendations in the tutorial above. It contains answers to your question.

  19. I have a formula that I want to make more specific
    =IF(AND(AM5="WASE-AH", (OR(U5="OVERSEAS/INELIGIBLE",U5="PRISONER", U5="T.A.C.", U5="VETERANS AFFAIRS", U5="WORKCOVER")),P5="4"),"Check", "Ignore")

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

  20. Hello!

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

    =IF(H4>=25%,10%,IF(H4>=30%,15%,IF(H4>=35%,20%,IF(H4>=40%,25%))))

    1. Hi!
      The formula below will do the trick for you:

      =IF(H4>=40%,25%,IF(H4>=35%,20%,IF(H4>=30%,15%,IF(H4>=25%,10%))))

      1. Thanks so much!!

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

    If(and(A1>0,b1>0),(average(A1,b1)),(A1,b1)

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

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

      =IF(AND(A2>0,B2>0),AVERAGE(A2:B2),MAX(A2:B2))

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

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

  22. Hello,

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

    =IF(G4<5,H4,IF(G4=10,H4+4,IF(G4>=15,H4+6,))))

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

  23. Hi,

    Would like to calculate some valuse.

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

    1. 1 calls =Rs.75

    2. 2 calls=Rs.150

    3. >3 calls =Flat Rs.300

    Blanck should not consider.

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

      1. can you please help me to find a formula for this question.

        this what the professor said.
        "You must use a lookup function WITH an ARRAY Form for this column. Be sure that you implement the EXACT cutoff here using a range of scores with no more than 4 rows."

        1. Hi!
          Try the following formula:

          =VLOOKUP(B2,{0,"Poor";40,"OK";70,"Good";90,"Excellent"},2,1)

          This is Vlookup for approximate match

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

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

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

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

    thank you so much!

    1. Hello!
      Try this formula

      =IFNA(IF(VLOOKUP(A14,Table1[[#All],[Name of Person]],1,0)=A14,”yes”,”no”),IFNA(IF(VLOOKUP(B14,Table1[Email],1,0)=B14,”yes”,”no”),”not found”))

      1. thank you so much!!! it works :)

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

  27. Hello Expert,

    I need a formula with support following terms...

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

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

    5000 difference

    =IF(C6<5000,"1",IF(C6<10000,"2",IF(C6<15000,"3",IF(C6<20000,"4","5".........................infinity))))

    I need Solution of infinity

    kindly help

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

      =INT(A1/5000)+1

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

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

    1. Hello!
      I didn't quite understand your calculations, but I suggest this formula

      =IF(IF(C4>=200,0, IF(B4=50,100-C4, IF(B4=100,200-C4)))>0,IF(C4>=200,0, IF(B4=50,100-C4, IF(B4=100,200-C4))),0)

      I hope it’ll be helpful.

      1. That worked! Thank you so much!

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

  30. Hello Alexander,

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

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

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

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

      =COUNT(IFERROR(SEARCH("Category M",B1:B10,1),"")*(--(G1:G10)="Yes"))

      This is another way to solve your problem

    2. I think I've solved the problem using COUNTIFS and multiple criteria. Thank you for all the help and advice you've given to everyone!

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

    1. Hello!
      Please try the following formula:

      =IF(ISNUMBER(A1),B1,IF(ISNUMBER(A2),B2, IF(ISNUMBER(A3),B3,IF(ISNUMBER(A4),B4,"" ))))

      Hope this is what you need.

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

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

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

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

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

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

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

    Thank you for your help.

    Regards,
    D$

    1. Hello!
      I believe the following formula will help you solve your task:

      =CONCATENATE(IF(ISNUMBER(MATCH(A3,Sheet2!A1:A28,0)),Sheet2!C6,""),IF(ISNUMBER(MATCH(A3,Sheet3!A1:A28,0)),Sheet3!C6,""),IF(ISNUMBER(MATCH(A3,Sheet4!A1:A28,0)),Sheet4!C6,""))

      =TEXTJOIN(",",TRUE,IF(ISNUMBER(MATCH(A3,Sheet2!A1:A28,0)),Sheet2!C6,""),IF(ISNUMBER(MATCH(A3,Sheet3!A1:A28,0)),Sheet3!C6,""),IF(ISNUMBER(MATCH(A3,Sheet4!A1:A28,0)),Sheet4!C6,""))

      You can learn more about MATCH function in Excel in this article on our blog.
      Please have a look at this article — TEXTJOIN function in Excel to merge text from multiple cells

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

    1. Hello!
      It is very difficult to understand a formula that contains unique references to your workbook worksheets. Hence, I cannot check its work, sorry.
      Describe in detail what problem you have, and I will try to help you.

    2. on the 1st IF statement the value of A1 is appearing, but when I tried on the 2nd IF statement the value returns #N/A

  37. Hi,

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

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

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

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

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

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

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

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

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

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

    Thanks!

    1. Hello!
      Please re-check the article above since it covers your task.
      For example,

      =IF(OR(A2=0,B2=0,C2=0,D2=0),A2+B2+C2+D2)/3

  38. Hi Boss,

    Need your support to correct the formula for me.

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

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

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

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

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

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

    Thank you!

  40. Hello,

    I urgently need help here, how would I format:

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

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

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

    Thanks in advance!!
    Linda

  41. here is what I'm trying to solve:

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

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

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

    hope that makes sense. Thanks for your help.

    1. Happy to report that I figured it out!!! Thanks!

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

      1. Thank you so much it worked very well

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

    1. Hello!
      I think that the cell in which the date is written must have a date format. Therefore, I recommend using the CELL function and checking what format the cell has.

      =CELL("format",F3)

      I hope I answered your question. If something is still unclear, please feel free to ask.

      1. I got it.. thank you?

  44. Hi,

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

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

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

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

    Eng Recruits Refresh
    Yes Yes Yes
    Yes Yes
    Yes
    Yes
    Yes
    Yes

    1. 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:

      =IF(AND(A2="Yes",OR(B2="Yes",C2="Yes")),1,0)

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

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

    1. what is the formula? If age is between 18 and 56 and Sex is either "M" or "F", remark is "Qualified"

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

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

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

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

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

    Thanks,
    Kyle

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

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

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

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

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

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