Comments on: Excel nested IF statement - multiple conditions in a single formula

If someone asks you what Excel function you use most often, what would your answer be? In most cases, it's the Excel IF function. A regular If formula is very straightforward and easy to write. But what if your data requires more elaborate logical tests with multiple conditions? Continue reading

Comments page 2. Total comments: 365

  1. I have an Excel sheet that has 1 of 4 possible subjects in cell C3 (English, Maths, History, French) and in cell AD3, I have the "score" which is an average of a number of preceding cells in the same row.

    I am attempting to get a "Pass" or "Fail" result to appear in cell AE3.

    This needs to be based on the following:
    Pass =70%+ for English and Maths
    Pass = 60%+ for French and History

    e.g
    if cell C3 contains "either English or Maths" and the score is more than 70% show "Pass" in cell AE3

    and

    if C3 contains "either French or History" and the score is more than 60% show "Pass" in cell AE3

    Could you please help with a formula to solve this....

    1. If d2=1 and e2>99, "fail", "pass", if d2>1 and e2 is >249 "fail", "pass".

      1. Sorry, can you help me create a formula with these conditions?

        If d2=1 and e2>99, "fail", "pass", if d2>1 and e2 is >249 "fail", "pass".

      1. Thanks for the fast reply.... just tried and this did not work if the C3 cell contained Maths or English and the value in AD3 = >70% any thoughts?

  2. Hi,
    I am trying to write a formula that states:
    IF cell C1 = Daily then do this sum ((D1/60)*7.5))
    IF cell C1 = Weekly then do this sum ((D1/60)*37.5))
    IF cell C1 = Fortnightly then do this sum ((D1/60)*75))
    IF cell C1 = Monthly then do this sum ((D1/60)*162.5))
    IF cell C1 = Quarterly then do this sum ((D1/60)*487.5))
    IF cell C1 = Yearly then do this sum ((D1/60)*1950))

    Can anyone help please?

    Thanks
    Suzy

      1. Thank you for coming back so quick.
        I have tried to simply a little and have put the below function in but it keeps coming back with the error #NAME? in the cell:
        =IFS(D9="Daily",(AF9/7.5),D9="Weekly",(AF9/37.5),D9="Fortnightly",(AF9/75),D9="Monthly",(AF9/162.5),D9="Quarterly",(AF9/487.5),D9="Yearly",(AF9/1950))

        1. I also only have excel 2016 so i am not sure it recognises IFS

  3. Thank you for this information. Unfortunately, I was not able to get my formula to work.

    I am trying to get the following to happen. For column Y, the value is one of the following statuses: NEW, QUEUED, INPROG, REJECTED, CLOSED or (blank), For the statuses of NEW, QUEUED, INPROG I need the value returned to say "SR NEED COMPLETED". for status of REJECTED, I need the value returned to say "SR NOT NEEDED". for the status of CLOSED or (if it is blank), I need the value returned to say "SR NEEDED"

    My formula is =IF(OR(Y10="NEW", Y10="QUEUED",Y10="INPROG"), "SR NEED COMPLETED",(IF(Y10="REJECTED"),"SR NOT NEEDED","SR NEEDED"))))

    I've also tried this formula
    =(IF(OR(Y10="NEW",Y10="QUEUED",Y10=”INPROG”),"SR NEED COMPLETED",(IF(Y10="REJECTED”),"SR NOT NEEDED”,(IF(OR(Y10="CLOSED",Y10="")"SR NEEDED"))))))

    Any help would be appreciated.

    1. Hi!
      If I understand your task correctly, try the following formula:

      =IF(OR(Y10="NEW",Y10="QUEUED",Y10="INPROG"),"SR NEED COMPLETED",IF(Y10="REJECTED","SR NOT NEEDED","SR NEEDED"))

      1. This worked perfectly for me. Thank you.

  4. Hi I'm hoping someone one on this forum can help me,
    I have an excel spreadsheet which I want to tell me which stage I am in. For instance if text or date is entered in B2 write "Stage 1" in cell A2, if a text or date is entered in cell C2 change to "Stage 2" etc. Here is a copy of the code I have used that isn't working

    =IF(AND(ISTEXT(B2)),"Stage 1"), IF(AND(ISTEXT(C2)),"Stage 2"), IF(AND(ISTEXT(D2)),"Stage 3"),IF(AND(ISTEXT(E2)),"Stage 4"), IF(AND(ISTEXT(F2)),"Stage 5")

    Any help would be appreciated :)

    1. Hi!
      Please try the following formula:

      =IF(ISTEXT(B2),"Stage 1",IF(ISTEXT(C2),"Stage 2",IF(ISTEXT(D2),"Stage 3",IF(ISTEXT(E2),"Stage 4",IF(ISTEXT(F2),"Stage 5")))))

  5. Hi!
    I'm trying to check for criteria met for partner Status. If a company has status as "Bronze" they need to have 1 person or more that have passed a Test, if they have Status "Plata" at least 2 people must have passed a test and if their status is "Oro" 3 people minimum must have passed a test.
    Column E should say yes or not if the criteria is met. I have that Column C gives the partner Status as Text and Column D has the number of people that have passed the test.
    I have the formula when I have only one level:
    Level Passed Met Criteria
    Bronze No
    Bronze 1 Yes
    Bronze 4 Yes
    Using this
    =IF(AND(C67="Bronze", D67>=1), "Yes", "No")
    I want to be able to check if another level (Levels Plata and Oro are in text form in Column C as well) is assigned the test criteria is met
    here is what I've Tried:
    =If((AND(C26="Bronze", D26>=1), "Yes", "No"),if(and(C26="Plata", D26>=2), "Yes", "No",if(and(C26="Oro",D26>=3), "Yes","No")))

    I've also tried with OR

    Thank you in advance for your help!

    1. Hello!
      If I understand your task correctly, try the following formula:

      =IF(AND(C26="Bronze", D26>=1), "Yes",IF(AND(C26="Plata", D26>=2), "Yes",IF(AND(C26="Oro",D26>=3), "Yes","No")))

  6. I have a nested If function formula with vlookups that is returning a false value.
    In short, I have multiple bank accounts, where is the final 4 numbers is the bank account = a set number, I need the vlookup to draw information from another worksheet.

    =IF(X3="","",IF(X3="2121",IFERROR(VLOOKUP(N3,'Monthly CR Data'!T:AA,8,FALSE),IF(X3=2089,VLOOKUP(N3,'Monthly CR Data'!U:AA,7,FALSE),"Not Reconciled"))))

    Problem is, it works for the '2121' account, but the '2089' account pulls back a false value, rather than doing the VLOOKUP in the cells specified.

    Any help would be greatly appreciated

    1. Hi!
      I can't check the formula that contains unique references to your workbook worksheets. Try adding quotes in the second IF condition. X3="2089"

  7. hi! i have am trying to capture multiplying by the higher value.
    i have, minimum order Quantity (MOQ) in A2, and i have the customers required amount in B2.

    and i have unit price in C2

    so when MOQ is higher, multiply MOQ x unit price, but when customer requirement is higher, multiply requirement by unit price.

  8. in this formula we able to merge 2 column value how can we merge multiple value of column B formula is =IF(A3A2,B3,B3 &","&B2)

    Thanks for your support in advance.

    1. Hi!
      Add the values you want to merge to the formula. For example

      =IF(A3>A2,B3,B3 &","&B2&","&B4)

      If this is not what you wanted, please describe the problem in more detail.

  9. Could you maybe help me with a formula for this problem?

    I have a spreadsheet with a lot of data, and I will like for you to help me with he below

    I have over 6K members that were prescribed medications during years 2021 and 2022.

    I want to know which members had medicine prescribed during 2021 only, 2022 only or both (2021 & 2022). I want to have a formula that displays "2021", "2022" or "BOTH"

    I have the below columns among all the data:

    Prescribed date (using format YYY-MM-DD)
    Prescribed Year (YYYY)
    Person Id (Unique ID numbers) - This column has all ID numbers for members that received medications, meaning that is possible one member ID could be in this column multiple times if this person got medications more than once. Example below

    ID Fill Date Year What I'm looking for
    12345 2022-05-05 2022 BOTH
    12345 2021-01-03 2021 BOTH
    01123 2022-03-09 2022 2022
    05486 2021-01-25 2021 2021
    23546 2021-05-30 2021 2021
    01123 2022-04-09 2022 2022

    1. [ ID ] [Fill Date] [Year] [What I'm looking for]
      12345 2022-05-05 2022 BOTH
      12345 2021-01-03 2021 BOTH
      01123 2022-03-09 2022 2022
      05486 2021-01-25 2021 2021
      23546 2021-05-30 2021 2021
      01123 2022-04-09 2022 2022

  10. I can figure out why the formula is breaking. The data columns it's pulling from are all validation lists.

    =UPPER("1 x 1 "&[@[Year & Quarter]]&" "&C6&" "&IF([@Site]="Facebook","FB",IF([@Site]="twitter","TW",IF([@Site]="TikTok", "TikTok",IF([@Site]="Reddit","Reddit", IF([@Site]="snapchat","Snapchat",IF([@Site]="Pinterest","Pinterest","No Social Platform"))))))&" "&[@[Audience Type Category
    (Automated when Salesforce Audience ID is present)])"&[@[Analytics Report Placement Name
    (Freehand/Use "NA" if blank)]&" "&[@[Opt Descriptor
    (Freehand/Use "NA" if blank)])

  11. Hi Alexander,

    could you maybe help me with a formula for this problem?
    I want to check how many deliveries were made on time for 3 separate categories. There are deliveries that are emergency , priority and regular.
    Emergency deliveries should be delivered within a day so x<=1
    Priority deliveries should be delivered within 2 days so y<=2
    Regular deliveries should be delivered within 7 days so y<=7
    If it took more then the days mentioned above, delivery is considered late.

    My data set looks like the following:
    x - 1
    y - 5
    z - 6
    z - 0
    z - 2
    y - 0
    x - 1
    x - 0
    x - 0

    How can I combine this question into one formula?

      1. Hi Alexander, I think it is not exactly what I am looking for.
        I managed to make this formula for 1 category (emergency deliveries) =IF(AND(A2="Emergency",B2<=1),"1","0"). In this way I am asking excel to show me emergency deliveries that are delivered either on time (1) or too late (0) which in this case it is on time if it is delivered within a day. How can I add the other two categories? Priority and regular. Priority should be delivered within 2 days and Regular within 7 days. I thought I need to and two more if functions but if I do so I get #value

  12. Hello I have been stuck on this IF statement for three days now and I keep getting invalid or the pound sign, as well as just the equation I'm inputting to still be there with nothing being done. This one is kind of weird to do, for me: I have to make a nest statement for when I can go to the beach the set up is below. I can only go on Friday, the weather has to be nice and I have to have at least $500. That's the only numeric number but I set it up different ways so many times that I've lost sight of what and how to use the and, can't... =IF(A4<=Friday?, "Yes", IF(A4=,Bad Weather, "No", IF(A4<=$500, "Can't Go"))) A4 is the first cell with Friday in it. Can you tell me what I'm doing wrong? I've watched a couple of youtube vids, and articles but the formulas I try yield the same result: Nothing. Please and thank you for your time.

    Friday with an drop down arrow
    Friday
    Anyday

    Sunny and warm
    Sunny and warm
    Nasty

    $500

  13. Hello

    I cannot figure out how to fix this IF AND NESTED formula. Please help.

    =IF(AND(R2>=19.01, R2=21.01, R2<=23, 70, IF(R2<=23.01, 75, " " )))

    1. Hello again.

      There was a copy and paste error in my above question. This is the actual formula that I need help with.

      =IF(AND(R2>=19.01, R2=21.01, R2<=23, 70, IF(R2<23.01, 75, "")))

  14. Hi so this is my current formula

    =IF(OR([@[FULL NAME]]="Player 1",[@[FULL NAME]]="Player 2",[@[FULL NAME]]="Player 3",[@[FULL NAME]]="Player 4",[@[FULL NAME]]="Player 5",[@[FULL NAME]]="Player 6", [@[FULL NAME]]="Player 7", [@[FULL NAME]]="Player 8"),"DEF")

    I'm wanting to add two other IF OR onto the formula, so if player 9, player 10, player 11 then itll be MID and then for players 12, 13, 14 itll be 'ATT'.

    Does anyone know how I could add these on?

    Thanks in advance!

    1. Hello!
      Extract digits from text using the RIGHT function. Convert them to a number, as described in this guide.
      Use a nested IF function to get the result you want.

      =IF(--RIGHT(A1,2)>11,"ATT", IF(--RIGHT(A1,2)>8,"MID","DEF"))

  15. Good morning - I am looking for a simplified formula to calculate all of the possible outcomes between 4 categories (East, Midwest, South, and West) and their 3 potential ratings (Low, Medium, High). The current formula - which has accounted for all possible outcomes - has produced 81 levels of nesting (3 x 3 x 3 x 3 = 81), which obviously is too large and cannot be entered. I was wondering if using IFS instead of nested IFs might work? Any suggestions would be tremendously appreciated - thanks!

  16. Hi,

    What can be the formula for this?
    Since I have 140k line items, how can I group the Order No. based on the Items?
    Let's say classification is not available and I want to group the order no. with multiple types of goods as "Mixed Items".

    Order No. Item Classification
    1 Fish Mixed Items
    1 Veggies Mixed Items
    1 Fruits Mixed Items
    1 Rice Mixed Items
    2 Fish Seafoods Only
    2 Fish Seafoods Only
    2 Fish Seafoods Only
    3 Bread Breads Only
    3 Bread Breads Only

    Thanks in advance!

    1. Hello!
      If I understand your task correctly, try the following formula:

      =IF(COUNTA(UNIQUE(FILTER($B$1:$B$100,$A$1:$A$100=A1)))=1,"Mixed items","")

      or

      =IF(IFERROR(ROWS(UNIQUE(FILTER(B1:B100,$A$1:$A$100=A1))), 0)=1,"Mixed items","")

      For more information, please visit: Count unique values with criteria.

  17. I have a column of cells with drop-down options of "Complete", "In Progress", "Not Started", and "Backlog." J6 - J25 specifically.
    I have a cell that I am attempting to display the overall progress as a percentage (located at H3).
    How do I get a selection of "Complete" to contribute to the percentage as a 100% value, the "In Progress" to contribute to the percentage as a 50% value and all others 0.
    For example: J6-8 says, "Complete" "Complete" "Complete"... then H3 will say "100%"
    or "Complete", "Not Started" will have H3 showing "50%"

    1. Hi!
      Your description of the problem and the example do not match, but the formula could be something like this -

      =IF(SUM(--(J6:J8="Complete"))=3,100%,IF(SUM(--(J6:J8="In progress"))=3,50%,""))

      About using double dash (--) with boolean values learn more in example 3 in the article - SUMPRODUCT and SUMIFS in Excel. I hope my advice will help you solve your task.

  18. Hi Alex
    I have one column (E) where i have the percentage calculated.
    Then i have a Target Points Colums (B) with numbers 1-5
    now i need to set a condition in COlumn F, where if the average is 100% and above i need to add 1 to the value in column B

    100%-110% plus 1 90%-100% minus 1
    110%-120% plus 2 80%-90% minus 2
    120%-130% plus 3 70%-80% minus 3
    130%-140% plus 4 60%-70% minus 4
    140%-150% plus 5 50%-60& minus 5

    Thanks
    A

      1. Hello, please help with any formula suggestions for what I'm trying to do -
        For each dollar of new income (as shown in cell D13) between $140 and $220, calculate an abatement of .20cents per dollar, and deduct this from current income (found in D7)....
        Then for each dollar of new income (D13) above $220, calculate an abatement of .50cents per dollar, and also deduct this from current income (found in D7).
        My version of excel is older; can't use SUMIFS.
        (sorry to hijack this thread, can't find where to start a new comment)

  19. Would like some advice about a nested IF formula. The formula I have written is: =IF(L2>0,L2,IF(K2>0,K2,IF(J2>0,J2,IF(I2>0,I2,G2))))
    with the intention that the latest filled column from I to L should be copied over to a new column and if there's nothing in I-L then column G should be copied instead. The formula works if column L is filled in and SOMETIMES if there's only column G to copy but not for any other scenarios.
    Example:
    G= 7
    I = 9
    J= 11
    K = Blank
    L = Blank
    M with formula should show 11

    I can't work out what I've done wrong!

    1. Hello!
      Use the INDEX+MATCH functions to find the last non-empty cell in a range. The following tutorial should help: How to use INDEX and MATCH in Excel.
      Please try the following formula -

      =INDEX(I1:L1,,MATCH(1E+20,I1:L1,1))

      =IFERROR(INDEX(I1:L1,,MATCH(1E+20,I1:L1,1)),G1)

      I hope I answered your question.

      1. Yes!!! It worked. Thank you. :)

  20. Hi,

    I want to sort company revenue with the following conditions:

    $250M

    How do I turn this into a nested IF formula? Or do I use another type of formula?

    1. Sorry the conditions didn't load up completely. The conditions are:

      $250M

      1. Sorry, just ignore this

        1. On the second thought, can you please evaluate if this formula is correct? Thank you!

          IF(Z3 < 100,000.00, "250,000,000.00, " > 250M))))))))))

            1. Thank you for linking the guide. Bless you!

  21. Please support me for following XL formula-
    IF 10000, he is ultra-poor
    IF 10001 to 15000, he is poor
    IF 15001 to 25000, he is middle class

    Thank you

  22. I am trying to do a nested if, and it is telling me I have too many arguments. In cell w2, i am inputting the word "yes", "no", or "probation". I wrote this formula. I am not sure where I have an error, Please help.

    =if(w2, "yes", "APR Complete",
    IF(w2, "no", "APR Needed",
    IF(w2, "probation", "Not Applicable")))

  23. Hi
    Thanks for an excellent article.
    I have successfully managed to get the correct results for the first 3 conditions below. However with regards to IF(AD2>-10,"Big Loss", if the number is greater than -10, it still returns loss instead of "Big Loss"
    What can I do to correct this in the formula below.
    =IF(AD2>=10,"Big Profit",IF(AD2>0,"Profit",IF(AD2<=0,"Loss",IF(AD2<=-10,"Big Loss"))))
    Many thanks,
    Radley

  24. Hi I need to calculate the following

    If car is 1200cc or lower the and the following will apply and if the car is 1200 of higher the following will apply. Any help would be appreciated

    1200cc or lower

    up to 1500KM .3795 per KM
    1501 to 14000KM .4109 per km
    14001 to 25000 .2550 per km

    1201cc or higher
    up to 1500KM .3986per KM
    1501 to 14000KM .4109 per km
    14001 to 25000 .2550 per km

    Your help would be greatly appreciated on this

    Ollie

  25. Question. I have been racking my brain all night on this.

    I have 3 pieces of information that are linked to a master table on another sheet.

    I have A1 - Date Assigned
    I have A2 - Goal date
    I have A3 - Date completed

    I want to be able to put in a date into assigned and on my tracker have it read "A" on my master tracker
    I am able to calculate a goal date, but want it to show "D" if is goes past the goal date referenced in A2 on the master tracker.
    And then I want to be able to put a date in A3 and then have it read "X" for when there is a date listed for completion on my master tracker.

    In addition, I want to be able to notice if there are no dates in either A1, A2, or A3 that it just shows blank on the master tracker.

    I hope that is enough information to go off of.

    Thanks for your help.

    1. Also worth noting I have tried to get a formula using =IF(Z6>=TODAY()-(W6*7),AJ6,IF(Z6<=TODAY()-(W6*7),AJ7,IF(AE6,AJ8, "")))

      But it will only do the first two it won't allow my third argument to go.

  26. I have a calculation between 2 cells where, based on the sum, the value should change. If not true, then the value should = the calculated sum. This is the latest attempt but not working. Thanks in advance !

    if(H39*0.5)+(H41*0.5)=1.0,"1", if(h39*.05)+(h41*0.5)=2.0,"2", if (h39*.05)+(h41*0.5)=3.0,"3")))

    1. Hi!
      I fixed the errors in the syntax of the IF function

      =IF((H39*0.5)+(H41*0.5)=1,1, IF((H39*0.05)+(H41*0.5)=2,2, IF((H39*0.05)+(H41*0.5)=3,3)))

      1. Hello, and thank you so much! Getting closer but not quite there.

        The problem I have is the results field is formatted with a decimal. When the result is a whole number I do not want the .0 . I have solved for this by using "". However, if the result is not a whole number (1,2, 3.) then I need the calculation to show the results "as is" ( e.g. 0.5). Here is my latest attempt but still not working. Wondering if is should use "or"?... Thanks again!

        =IF(H39*0.5+H41*0.5=1,"1",H39*0.5+H41*0.5),IF(H39*0.5+H41*0.5=2,"2",H39*0.5+H41*0.5),IF(H39*0.5+H41*0.5=3,"3",H39*0.5+H41*0.5)

        1. Hi!
          Change the number format to "General" and you won't see 0 in integers.

          =H39*0.5+H41*0.5

          Or use the text "1" instead of the number 1.

          =IF((H39*0.5)+(H41*0.5)=1,"1",IF((H39*0.05)+(H41*0.5)=2,"2",IF((H39*0.05)+(H41*0.5)=3,"3",H39*0.5+H41*0.5)))

          1. Hello again and thank you so much for your quick reponse!

            Wonderful! I'm going to go with the cell format change to "General". I learned more about the nested IF statement through this exchange but it simplifies the formula, so thank you!

            Have a wonderful day!

  27. Hey,

    I am struggling to finalise a nested if function.

    For context, I am trying to calculate point allocation for an online gaming tournament via Excel/Google Sheets.

    These are the possible outcomes of the game depending on the end score:

    Win = 3 Points
    Overtime Win = 2 Points
    Overtime Loss = 1 Point
    Loss = 0 Points

    The way the scores work on the game, I have been able to determine thresholds for scores using ratios (e.g. A score of 7:5 would be a ratio of 1.4). However, when the games haven't been played yet, the score box is empty (meaning the ratio goes to #DIV/0!) and it impacts the sum of points (which is linked to an automated league table).

    I have been able to design a Nested IF formula using the ratio thresholds. There are a lot of possible end scores (7:0, 7:1, 7:2, 7:3, 7:4, 7:5, 8:6, 8:7, 7:8, 6:8, 5:7, 4:7, 3:7, 2:7, 1:7 and 0:7) which is why ratios really simplified it. The formula but can only be applied to the played games, otherwise, as said above it messes with the sum of points.

    Version that works (Limited) :

    =IF(A5>1.39, $D$72, IF(A5>1.10, $D$73, IF(A5>0.74, $D$74, IF(A51.39, $D$72, IF(A5>1.10, $D$73, IF(A5>0.74, $D$74, IF(A5<0.72, $D$75)))))

    Legend:
    A5 - Row where the ratios are (A)
    I5 - Point difference column (I)
    J5 - Points column (J) (where the formula is input)
    $D$72 - 3 (Points)
    $D$73 - 2 (Points)
    $D$74 - 1 (Points)
    $D$75 - 0 (Points)
    $D$80 - 0 (Default point difference when game hasn't been played)

    I appreciate there is a lot going on here. Any help/advice would be appreciated. I can send a screenshot on request to make it clearer but do not want to spam the blog with a link to the spreadsheet.

    1. There seems to have been an error when posting the comment, this is the formula I have used that partially works :

      =SI(A5>1.39, $D$72, SI(A5>1.1, $D$73, SI(A5>0.74, $D$74, SI(A5<0.72, $D$75))))

      1. Thank you Alexander, I will have a look !

  28. Hello,

    I did it for 5 conditional, and get the feedback "You've entered too many arguments for this function". So my question is "Is there any other way for 4 and more conditions?".

    Thank you in advance,

    Lachin.

  29. can i ask, I have two seperate of IF function i want to add together

    =IF(E10=$K$6,"90.1",IF(E10=$K$4,"51.6",IF(E10=$K$5,"80.5")))

    =IF(F11=$K$20,"85",IF(F11=$K$19,"61.3",IF(F11=$K$18,"61.3")))

    how can i add these two IF together in one cell, is it possible?

    1. Hi!
      I don't think this is possible. What value should be returned if the conditions are met simultaneously - E10=$K$6 and F11=$K$20 ?

  30. I feel like what I am attempting is not that difficult, but I have searched and searched and can't find the answer.

    I will tell one of the easier scenarios and can probably get the gist of how to write it and use that on the more difficult ones.

    We have a sales quota at my bank of a total of 45 items but in order to be paid a bonus some of these have to be particular things. Like you can't just open 45 savings accounts and get a bonus.

    Of the 45 items you must have 11 things specific things and then after that they can be anything as long as there are 45 or more. I have already done all the calculation of the sales $ amounts separately (as if they met all rules) and have it stated in the cell above where I want to put this calculation that I will need to actually pay out.

    So I just need this calculation to tell me whether to give a 0 if all are not attained or if all are attained to give the number in the cell above. Sounds simple but so far cannot figure it out.

    I thought I would use an If And statement but can't get it to work correctly. It seems like I could say =IF(AND(# of checking accounts cell =3, # of savings accounts =2, # of credit cards sold =2....

    I would just go down the list of required things and say- If 'this rule' AND 'this next rule AND 'this last rule' are all true then copy the cell above to down here and if it's not all true put a 0 here.

    See sounds simple but I can't find an example anywhere.

    1. Hello!
      To count the number of values that match certain criteria, use the COUNTIF or COUNTIFS functions.
      I hope I answered your question. If something is still unclear, please feel free to ask.

  31. Hi Alexander,

    I would like to multiply cell A3 by cell B3 to return a result in C3, however if there is no number in A3 I would like instead it to multiply A1 by B3 to return a result in C3. If both A3 and A1 are empty, I would like C3 to return no result. Can you please help me with this?

    Kind regards

    1. Hi!
      I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
      The formula below will do the trick for you:

      =IF(AND(A3="",A1=""),"", IF(AND(A3="",ISNUMBER(A1)), A1*B3,A3*B3) )

  32. Why does this not work:
    IF((F7=5),SUM(E6/F7),if(F7=4),sum(E5/F7),E2)

    1. Ignore this one it's not what I am trying to do. Thanks

  33. Hello,
    I converted a text file into an excel and some cells are split into 2 cells. For example, cell B1 now shows up as B1 and in B2.

    the sheet looks something like this:

    A1: Na B1: Ly
    A2: B2: dia
    A3: B3:
    A4: City B4: Toro
    A5: B5: nto
    A6: B6:
    A7: Day B7: Monday
    A8:Day B8:Tuesday
    A9: Car B9: Audi
    A10: B10: xxi
    A11: B11:

    what I would like to do, is have cells B1 & B2 show up in 1 cell in C1 based on the condition:
    =IF((AND(B1>0,B2>0,B3=0,A2=0)),B1&B2,B1)

    I also tried using the concatenate(B1,B2) instead of ,B1&B2, but got the same results:
    LY

    I wanted to get LYDIA.

    Not sure why I am not getting the right results.

    As well, is it possible in the results that cell B2 not populate again underneath so the end result will look like this:

    A1: Name B1: Ly C1: Lydia
    A2: B2:dia C2:
    A3: B3: C3:
    A4: City B4: Toro C4: Toronto
    A5: B5:nto C5:
    A6: B6: C6:
    A7: Day B7: Monday C7:Monday
    A8:Day B8:Tuesday B8: Tuesday
    A9: Car B9: Audi B9: Audi xxi
    A10: B10: xxi B10:
    A11: B11: B11:

    Thank you,
    Lydia

    1. Hello!
      In the cells that look empty, some text character is written (space, line break, apostrophe). Therefore, your formula does not work. Check these cells and try this formula

      =IF((AND(B1 < > "",B2 < > "",B3="",A2="")),B1&B2,B1)

      I hope my advice will help you solve your task.

  34. Sir, I have made a formula for the below calculation & its not working.

    Employees will get his end of benefits based on the service tenure.
    Conditions to eligible for the end of benefits based on the service years are as follows

    IF service less than 1 year = 0
    if >1 3 5 = salary /30* 21

    If - those have long service 05 years & more, then the calculation should be - for up to 05 years (Salary/30*21) above 05 years (salary/30*30)

    1. Hi!
      Read carefully the first paragraph of this article. There is an answer to your question and an example formula.

  35. Hello,
    Thank you for the informational tutorials!
    I am trying my hardest to create an excel sheet to quickly sum up points based on a score.
    For example, if you finish 1st, you receive 40 pts, 2nd = 39, etc..
    I have a column for "Place": 1, 2, 3...40
    I have a column for "Points."
    Could you please provide me with some direction on HOW to get 1st Place = 40 pts, 2nd Place = 39, etc?
    I thought this would be an IF formula but I'm not getting the output I would like, just VALUE!
    I would GREATLY appreciate it!

  36. I like to have different formulate based on the previous cell conditions eg, =if(c2="Male",2+1,if(C2="Female",2-1)) but I get error

    1. You need an "else" option.

      If there are only Male and Female in your list with no blanks then:
      =if(c2="Male",2+1,2-1)

      OR, instead of making a formula, just state the value for each:
      =if(c2="Male",3,1)

      If there are blanks:
      =if(c2="Male",3,if(c2="Female",1,2))

      I'm a fan of binary myself:
      =if(c2="Male",1,if(c2="Female",0,""))
      This counts all the males, provides a 0 for females, and a blank for anyone missing that information. This allows you to sort by that column and fill in the missing information if desired but the Else could also be something like "U" for unknown.

      Hope this helps.

  37. UPI/103312588735/CR/NOBLE AUTO CARE K/CIU/Payment (Ref# S52276500)
    TRTR/776802210414/02-02-2 02121:04:14/BNA (Ref# S52704553)
    UPI/103418091878/CR/RAJAV EL/KKB/tyre (Ref# S55846936)
    UPI/103418535311/CR/BALAM URUGAN RENU/UTI/UPI (Ref# S56044583)
    UPI/103420379551/CR/Mr S VIJAY RAGHAV/IDI/Tyrep (Ref# S56421977)
    BY CASH JAYAMOORTHY (Ref# IB82474)

    i am trying to bifurcate the transactions in seperate catagory like - Cash, UPI, TRTR - how to plot multiple conditions in if statement

    I am trying below formula it is not working
    =IF(FIND("TRTR",F2,1),"TRTR",IF(FIND("ATM",F2,1),"ATM",0))

    Please help on this

    1. Hi!
      What exactly is not working in your formula? Perhaps you need to add all the conditions. For instance,

      =IF(FIND(“TRTR”,F2,1),”TRTR”,IF(FIND(“ATM”,F2,1),”ATM”,0),IF(FIND(“UPI”,F2,1),”UPI”,0))

  38. Hello,

    I've been working on an excel sheet for nearly a month and cannot figure out how to get the result that I want using IF Statements. I was able to get 2 of my statements to work the way I need them to but the third seems to require a few more IF, AND, OR statements to work but I cannot for the life of me get the result I want. My example is as follows:
    =IF(A2<=1,C31/1.7,0) This statement is in cell C32 and works as I intend it to with the correct result populating in C32. C33 and C34 populate as 0 which is what is needed.
    =IF(A3<=1,C31/1.3,0) This statement is in cell C33 and also works as I intend it to with the correct result populating in C33. C32 and C34 populate as 0 which is also what is needed.
    =IF(AND(A2=0,A3=0),C31/1.9,0) This statement is in cell C34 calculates the correct result in C34 however, C32 and C33 also calculate their respective correct results when I need them to return a result of 0.

    The actual cell data I am using is as follows:

    A1 $1,321.00
    A2 $567.00
    A3 $1,919.00
    A4 $50.00
    $3,857.00
    $308.56
    $4,165.56
    $1,000.00
    $700.00
    $700.00
    $0.00
    $0.00
    $0.00
    $0.00
    $6,565.56
    $2,500.00
    $0.00
    $9,065.56
    $453.28
    $9,518.84
    $0.00
    $0.00
    $0.00
    $0.00
    $0.00
    $0.00
    A31 $9,518.84
    A32 $0.00
    A33 $0.00
    A34 $0.00

    Any help or insight would be greatly appreciated! Thank you!

    1. Hello!
      Try adding one more condition to your IF function.

      =IF(AND(A2< = 1, A2 < > 0, A3 < > 0),C31/1.7,0) I hope it’ll be helpful.

      1. Thank you for the insight! I will play with adding an additional condition and see where that gets me.

        1. Just a follow up...
          Your suggestions did end up working! Thank you so much! After playing around with adding an additional condition, everything is working as I need it to, and I was even able to expand on that to encompass much more data. Thank you for the insight Alexander!

  39. Hello,
    I am seeing if anyone can help me write a nested formula with multiple arguments, or what is the best way to do what I'm trying to do? the result, based on what's was rcvd. yes, if yes result would be n/a, if not rcvd, the result would be yes, if n/a, result will be n/a

    RCVD NEEDED
    DOC 1 YES DOC 1 N/A
    DOC 2 NO DOC 2 YES
    DOC 3 N/A DOC 3 N/A

    =IF(X7="YES","N/A",IF(X7="NO","YES","YES",IF(X7="N/A","N/A","N/A")))

    1. Hello!
      Please check the formula below, it should work for you:

      =IF(X7="YES","N/A",IF(X7="NO","YES",IF(X7="N/A","N/A","N/A")))

  40. I need to write a formula like IF the company Name = List and Product name = List and Product category = List then The Price = List

  41. Wonder if anyone can help me to solve this
    Column B5: GOV or PRI
    Column B39: Total value example 2,500

    IF B5 = GOV, and B39 range 1 to 1,000 = 0, 1,001 to 2000 = 100, 2001 to 3000 = 200 etc
    IF B5 = PRI, and B39 range 1 to 1,000 = 0, 1,001 to 2000 = 50, 2001 to 3000 = 100 etc

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

      =IF(B39 < 1001,0, IF(B39 < 2001,100, IF(B39 < 3001,200, )))*(IF(B5="GOV",1, IF(B5="PRI",0.5,)))

  42. Basically i want that based on the value on B column, C column should be filled.
    below is giving me value 10 for all values of B column. Kindly help

    =IF(OR(B2>=0,B2=49,B2<=108),12))

    1. Hello!
      I don't know what values you have in column B. There is no value 10 in your formula. The second condition does not make sense, because if B2=49 then always B2<=108

  43. Hi! How do you write 17<=C13<=28 in a formula? Please help me. Thank you.

  44. How to compute in a 3 situation to the column 1 to column 2 in 1 formula

    Situation 1, Column 1 equal to column 2 the answer is column 2
    Sample:
    2 & 2 = 2
    -1 & -1 = -1

    Situation 2, Column 1 is greater than or less than column 2 but both positive or both negative the answer is whichever is higher
    Sample:
    2 & 3 = 3
    4 & 1 = 4
    -2 & -3 = -3
    -4 & -1 = -4

    Situation 3, Column 1 is greater than or less than column 2 but in different (Column 1 is positive and Column 2 is negative or vice versa) the answer should be in sum
    Sample:
    2 & -3 = -1
    -2 & 3 = 1
    -4 & 1 = -3
    4 & -1 = 3

    1. Anyone can solve this situation?

      1. Hi!
        If you read these instructions carefully, you can easily write the formulas you need. All the instructions you need are found above in this article.

  45. I need to count the value (will be a whole number) in Column "I" IF Column B word is "New" AND Column C word is "Shirt". How would I set this up?

    Thank you!

  46. Hello,

    Trying to create a formula with no success so far. The range of cells, in this case D:32:D35, are assigned either "yes" or "no". If 1-2 of these cells are marked "yes" then L:31 should be assigned value of .5. However, if 3-4 of the range of cells are marked "yes", then L:31 should be assigned value of 1.

    Any advice greatly appreciated.

    Thanks!

  47. I am looking for a formula that will give me a percentage if a certain number falls within a range of numbers.
    Range:
    $200-$299 I get 1%
    $300-$399 I get 2%
    $400-$1000 I get 3%

    Scenario--My total sales are $39,308 and I worked 147 hours this would put me at $267.40 per hour, by the example below I would get 1% of the 39,308 totaling $393.08 commission

  48. Hi how can I make this formula shorter? It seems like it doesn't work because its too long but its all the data i need to input. thank you!!

    =IF(H21>2.8,6.60,IF(H21>2.7,7.20,IF(H21>2.6,7.80,IF(H21>2.5,8.40,IF(H21>2.4,9.00, IF(H21>2.3,9.60,IF(H21>2.2,10.20,IF(H21>2.1,10.80,IF(H21>2.0,11.40,IF(H21>1.9,12.00,IF(H21>1.8,12.60,IF(H21>1.7,13.20,IF(H21>1.6,13.80,IF(H21>1.5,14.40,IF(H21>1.4,15.00,IF(H21>1.3,15.60,IF(H21>1.2,16.20,IF(H21>1.1,16.80,IF(H21>1.0,17.40,IF(H21>0.1,18.00))))))))))))))))))))

    1. Kindly,remove the commas from the digits

  49. I am trying to write a formula such as this:
    =IF((M10="FORD")*AND(M23="F750")*OR(M23="F550"),1,0)
    Basically i want to return a value of 1 if M10 is equal to FORD and M23 is equal to either F550 or F750.

    This formula returns a value of 1 every time even if i have M23 equal to F250

  50. hi could you help me? im having trouble with my formula.

    here are the conditions;
    if 17<=X<=28, then the answer would be 0.85
    but if 28<X=55, the answer should be 0.65

    thank you

    1. X is in cell C4.
      i hope i could reach some help :((

Post a comment



Thanks for your comment! Please note that all comments are pre-moderated, and off-topic ones may be deleted.
For faster help, please keep your question clear and concise. While we can't guarantee a reply to every question, we'll do our best to respond :)