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 11. Total comments: 656

  1. hey.. can u please help with this one.

    i have to make the bill and it is calculated as follow

    1, select a company.
    2, select an order number.
    3, select a colour(and its price).
    4, multiply it with the colour's price.

    i have to test one cell on four different criteria to get to the billing amount. please help me.

    1. *4, multiply the weight with the colours price.

      1. if its not self explanatory, let me know i'll send you a sample sheet which might help you.

        thanks alot guys. u all are awesome.

  2. Dear
    i need help to make a formula for the following issue:

    firstly i want to make a category suppose
    age 770 to 1030 milkable cow
    Age 1030 to 1190 Dryer cow

    Secondly if dryer then how many days gives milk a milkable cow within one year.

    Thanks
    Jafor

  3. Hi

    I have a text value as

    Yes or No combination in Column A,
    Completed, in-progress and YTS in Column B,
    this is combination if "No" in column A and i have In-progress in Column B i need to get a value "Red" likewise
    if i have "Yes" in Column B and i have Completed in column B then i need to get a value as "Green"

    Kindly help to derive a formula....

  4. I'm trying to create a formula for the following scenario and returning a #value error.

    If
    A = Yes and B = No
    or
    A = Yes and C = error
    then
    "Fail or Pass"

    1. Jan:
      I think this will work:
      =IF(OR(AND(D36="Yes",E36="No"),AND(D36="Yes",F36="Error")), "Fail or Pass",9)

  5. I have a really strange problem. I have like 3 conditions for 3 conditions and expect 2 possible outcomes (and no idea how to solve it).
    Example: I can have three concentrations (5%, 20% and 25%) and for given concentration I have another condition (x<y for 5%, a<b for 20% and c<d for 25%). And if the second condition is met for a given concentration, I expect outcome "OK". In other case: "not OK". Do you know how to deal with it? Please, help!

  6. every day were allowed to use $100 for cabs. If we don't use $100 only $50 can carry over to the next day which would be $150. But If we use $125 the difference will be subtracted from the next day so the $25 will be taken out of the next day which will be $75. If $200 were taking from that day, which would be negative $125, you subtract that from the next day $100 and that would be -25. Continuing this formula how would I word it out. Only able to carry over $50 or less a day.

  7. i have a data having diff product and diff division and i am unable to create an if nested formula to see if the product matches the division , if it matches than it should be 0 and if not than 1, so there like two divisions and 7-8 products i am confused
    the division's are BI and AS , it says that product "bike" belongs to the BI and all others to AS

  8. Hi,
    I am looking to create a formula that says that if cell h2 says either 1,2,3,4,5,6,or 7 it would be $287.68, $491.46, $713.82, $917.60, $1121.38, $1343.74 or $1547.52. would it be an if formula or would it be best as a having it pull from another sheet?

    1. Tasha:
      Do you mean IF H2=1 then G2=287.68 or do you mean something else?

  9. Hi there - I am looking to create a formula .... cells A and B will always have data, and I'm looking to populate cell C with a "score" based upon the criteria

    Cell A: (data will either be a W or NW)
    Cell B: (data will either be a Yes or No)

    cell C: (return score based upon one of the 4 scenarios)
    If cell A = W and cell B=Yes - return score of 0
    If cell A = W and cell B=No - return score of 5
    If cell A = NW and cell B=Yes - return score of 0
    If cell A = NW and cell B=No - return score of 10

    I appreciate any help that you can offer!

    1. Kathy B:
      OK, this is what I used to get the results you wanted.
      =IF(AND(A28="W",B28="Yes"),0,IF(AND(A28="W",B28="No"),5,IF(AND(A28="NW",B28="Yes"),"Zero 0",10)))
      Of course, you can change the cell addresses for A and B to whatever suits you.
      I entered the "Zero 0" as way to ensure the logic returned the correct result during my tests. You may want to keep this while you test it. Otherwise you can remove the quotation marks and enter a 0.
      Lastly, I will pass along these thoughts from Microsoft concerning multiple IF statements:
      While Excel will allow you to nest up to 64 different IF functions, it’s not at all advisable to do so. Why?
      1.) Multiple IF statements require a great deal of thought to build correctly and make sure that their logic can calculate correctly through each condition all the way to the end. If you don’t nest your formula 100% accurately, then it might work 75% of the time, but return unexpected results 25% of the time. Unfortunately, the odds of you catching the 25% are slim.
      2.) Multiple IF statements can become incredibly difficult to maintain, especially when you come back some time later and try to figure out what you, or worse someone else, was trying to do.
      3.)If you find yourself with an IF statement that just seems to keep growing with no end in sight, it’s time to put down the mouse and rethink your strategy.
      The formula we have here is relatively safe, but if you want to modify something in it, it could get confusing and error prone. Also, if someone comes behind you and wants to modify a condition or add a condition the same error problem could occur.

  10. HI DEAR,, PLZ MENTION THE IF FORMULA

    FOR EXAMPLE IF THE POLICY IS COMP THE COMMISSION IS 60% AND IF TPL THE COMMISSION IS 50%

    MEANS A AND B WILL SHARED 60% AND 40% IN COMPREHENSIVE WHILE 50% AND 50% IN TPL

    PLZZZZ

  11. Hello,
    Need help with formula with conditional ruling.
    Column C value ("Ship" or "Recv") will determine what formula will be implemented for Column I.
    Example:
    If C3="Ship" then I3=(H3-F3-G3)
    If C3="Recv" then I3=(H3+F3+G3)

    What is the best formula to use?

    1. Given: Column C = data input ("Ship" or "Recv")
      H3, F3, G3 = data to be solve respectively which depends on Column C
      Column I = here lies the result of your condition

      Formula in column I:
      =IF(C3="Ship",($H$3-$G$3-$F$3),IF(C3="Recv",($H$3+$G$3+$F$3),"Please Re-enter code"))

      1. Note:

        If Column C, H, F and G have their own data per column then please delete the "$" in the formula.

        Thanks

  12. SO I am having a hard time with the IF formula, for example Column A has a total number of sales, and if the sales are under 199 the customer would get $0, and if the sales are over 200 but less than 399 it would be Column A * $1, and if the sales are over 400 it would be Column A * $2. Any suggestions?

    0-199=0
    200-399=*$1
    400+= *$2

    1. GIVEN:
      Column A = Total Number of sales
      Column B = result of your condition

      Formula in Column B:
      =IF(A4=200,A4=400,A4*2,"")))

      Note: Just format the cell to accounting or such to indicate $ sign.

      Hope this helps.

  13. I'm looking for some help with this example

    1. Inspect blah for:
    a. Proper Installation
    b. Security
    c. Damage
    2. Inspect blah for:
    a. Wear
    3. Ensure blah is 20-30 lbs greater than blah.

    This is where I am at with my formula
    =IF(F2"",COUNTA($F$2:F2)&".","")
    The data above is column F
    I am trying to get it to count only if column F is not blank, but not Numeric steps if it has sub-steps (a., b., c. etc..)so that I have a column at the end that is a sequence starting at the designated number and increasing by one descending from row 2. Currently it counts each non blank cell without regard for weather or not it is a "end step". Any ideas?

    1. Tony V:
      It might be a question of how you structure the data.
      I believe you'll be able to get what you want if you structure the data like this:
      1 Inspect blah for:
      Proper Installation
      Security
      Damage
      2 Inspect blah for:
      Wear
      3 Ensure blah is 20-30 lbs greater than blah
      Numbers in column A, Inspect in column B sub steps in column C.
      This allows you to put the formula in column D. Of course you can put the data into whatever named columns you want, just be sure they are in separate columns.
      Be sure to reference the proper cell address in the formula.

      1. Thank you. That may work. If my project manager is set in his structure, is there an easy way to write the function so that (in english) if column has first character as a letter or next cell below and current cell are numeri, cout it sequentially?

        1. Tony V:
          The best way to work with data in Excel is to structure it in a manner that Excel can easily analyze. Otherwise, you'll have to ask the software to take apart the data so it can be analyzed. This requires more than just IF/AND/OR statements. In your case I think it could be done using VBA.
          At the end of the day I would recommend structuring the data so that it can be analyzed with Excel's regular functions. Then, if your manager insists on seeing the report in the fashion you first showed, structure it as I recommended, analyze the data and build a report with it. I've taken this approach many times and it works great.

  14. AND THNX DOUG FOR YOUR RESPONSE

    1. FAIQ:
      This looks like it needs an IF OR statement like this:
      =IF(K6="","EMPTY",IF(OR(K6="ABSENT"),"ABSENT",IF(K6<=1,"F",IF(K6<=49,"C",IF(K6=85,"A"))))))
      Notice the check for an empty cell comes first, then the check for the word absent. I typed EMPTY but you can type whatever word suits you. IF statements are not case sensitive so entering "ABSENT","Absent" or "absent" works.
      If you enter any word or character other than "Absent", the formula will return "A". That's as far as I got.
      Also I removed the last "N/A" because after empty and Absent there didn't seem to be any other condition to return.

  15. HI,
    I AM USING IF FORMULA FOR GRIDING I.E
    =IF(K6>=85,"A",IF(K6>=65,"B",IF(K6>=49,"C",IF(K6>=1,"F","N/A")))).
    BUT WHENEVER I WRITE SOME TXT LIKE ABSENT OR SYMBOL LIKE "-",THEN CELL CONTAING FORMULA SHOW IST CONDITION AND MARK IT AS "A".
    CAN SOMEONE HELP ME IN THIS MATTER

    1. Faiq:
      Where do you write this text?

      1. IN CELL (K6).IF SOME ABSENT AND I WRITE ABSENT OR "-" INSTEAD OF SECURING MARKS,THEN SAID FORMULA GARDE HIM AS IST CONDITION OF FORMULA MEANS GRADE HIM AS "A"

  16. Hi Sir,

    I need to write values in multiple columns with single condition using IF Statement. like...

    If(C1=10 then C2=20 AND C3=30 AND C4=40 else C2=70 AND C3=80 AND C4=90)

    how to write general formula for the above

  17. Hi Sir,

    I need to write values in multiple columns with single condition using IF Statement. like...

    If(C1=10 then C2=20 AND C3=30 AND C4=40 else C2=70 AND C3=80 AND C4=90)

    how to write general formula for the above

  18. how to apply if condition when value is in negative/below zero or value is above zero and we need the value either in zero or positive for example
    some time, while calculating income tax after saving the taxable income comes in negative we need the zero instead of negative value and if the value is in positive we need that positive value
    please explain how?

  19. Hello,

    Thanks for a very helpful knowledge. I'm stuck with this assignment for hours trying to figure out the formula. Wish u guys can help. I have set of data that needed to put into group. This is how it goes.

    A B C D E
    Item Description From To Category
    1 Cat Fish 1/2011 12/2012 Healthy

    2 Cat Fish 1/2012 12/2013 Healthy

    3 Cat Rice 1/2013 12/2013 Unhealthy

    4 Cat Fish 1/2014 12/2014 Healthy

    Based on the combination of items (Cat) and description (Fish & Rice), I can determine the category (healthy of unhealthy). My objective is to reduce the line item as to combine the range, (period from and to) since the line item 1 & 2 can be combine together from 1/2011 to 12/2013 since it goes tho the same category (Healthy).

    A B C D E
    Item Description From To Category

    1 Cat Fish 1/2011 12/2013 Healthy

    2 Cat Rice 1/2013 12/2013 Unhealthy

    3 Cat Fish 1/2014 12/2014 Healthy

    This is how I would like the end result would be. You guys have any idea how to formulate this?

    1. Sorry, this is how the range should be:

      Upper:
      A B C D E
      Item Description From To Category
      1 Cat Fish 1/2011 12/2012 Healthy

      2 Cat Fish 1/2013 12/2013 Healthy

      3 Cat Rice 1/2014 12/2014 Unhealthy

      4 Cat Fish 1/2015 12/2015 Healthy

      Lower:

      A B C D E
      Item Description From To Category

      1 Cat Fish 1/2011 12/2013 Healthy

      2 Cat Rice 1/2014 12/2014 Unhealthy

      3 Cat Fish 1/2015 12/2015 Healthy

  20. Hello,

    I am designing cash advance request form for employee/ Contractor, where I have preference data like
    Requester: employee or contractor (I use Data validation function here)
    Amount: $XXX (we have rules of approval of this request on base of $ amount)
    Rules - if $XXX 3000,Finance approve)

    How I can use if function / any other excel formula so can get correct result on Approval's field?

  21. Trying to do a formula. If O10+L11+M11 is greater than 40 this cell equals 40. If O10+L11+M11 is less than 40 us that sum.

    1. A simple method to accomplish what you want is to sum O10+L11+M11 in say cell N11 by entering in N11 =SUM(O10+L11+M11). Then in say cell P11 enter =IF(N11>=40,40,N11). This means that if N11 is equal to or greater than 40 display 40 otherwise display the number in N11.

  22. Hi say i have cells
    a - with different dollar amounts
    b - with either L2, L3, L4
    c - with Either anything from the Lists Below
    c.1 These can be clustered to rename the table as "LPF"
    Late Payment Fee
    LPF's info
    Late Payment Waiver Fee
    c.2 These can be clustered to rename the table as "NLPF"
    Customer Satisfaction
    CSAT Credit
    Nest Waiver Fee

    The Logic are :
    1. If there's no amount in cell "A" then it's "not applicable"
    2.a If cell "B" contains L4
    there are 2 conditions/logic
    a. If cell "B" contains "L4", cell "A" contains <-25 and cell "C"
    says that it's part of the "NLPF" list, then it shows "EXCEEDED"
    if not then it shows "NOT EXCEEDED"
    b. If cell "B" contains "L4", cell "A" contains <-50 and cell "C"
    says that it's part of the "LPF" list, then it shows "EXCEEDED"
    If not then it shows "NOT EXCEEDED"
    2.b If cell "B" contains L3, cell "A" contains <-100, then it shows
    "EXCEEDED", if not then it shows "NOT EXCEEDED"
    2.c If cell "B" contains L2, cell "A" contains <-300, then it shows
    "EXCEEDED", if not then it shows "NOT EXCEEDED"

    I already have the formula if cell "B" just have one condition/logic if it contains "L4" the thing is that it should contain 2 conditions plus it should consider the one written in cell "C". I'm finding it difficult to incorporate in my formula. Knowing that i also clustered the data in cell "C" into 2 groups.

    Can you help me regarding this?

    1. =IF(A1>=0,"Not Applicable",(IF(B1="Not Applicable","Not Applicable",(IF(AND(B1="L4",A1<-25),"Exceeded",(IF(AND(B1="L3",A1<-100),"Exceeded",(IF(AND(B1="L2",A1<-300),"Exceeded",(IF(AND(B1="L1",A1<-300),"Exceeded","Note Exceeded")))))))))))

      This is my original formula

  23. Hi Team,

    Greetings
    can you please suggest me how to calculate second largest number among three numbers in 3 cells with only nested if

  24. HI Hopefully you can help me with this formula I am trying to create a new sales order form and need to for example have a list of products in one cell and according to what item is selected then the appropriate cost will come up in another cell eg: list in h22 = valley then j22=$5 if h22=hip
    hip j22=$10 if h22=gable
    gable etc.
    if need to be able to enter apx 25-30 values in the first cell (h in this example) and 15-20 in the second cell (j in this example)some of the items on the list in h will have the same value in J

    in the past my sales orders have had a page to 2 pages of rows for selecting various items and the # of items and a price and total cost for that row then all the row totals are added and taxed at the end this is fine except no one can tell what they've bought because it prints the entire sheet with all rows whether anything was selected on a row or not. if there is a way to have it consolidate and print only the pertinent rows where something was selected that would be great also hope this makes a little sense any questions please ask. hoping you can help Mark

  25. Greeting,
    I am calculating staff mileage claim every month.
    I want to split the mileage by stage below.
    Perhaps you could help me how to calculate them if :-

    Total mileage claimable is 667.55km
    1st km to 100km @ $0.50/km = 100km
    101km to 300km @ $0.45/km = 300km
    301km & above @ $0.40/km = 267.55km

    Thank you in advance

  26. I have multiple conditions like if(and(B1<1,B2<6), "Not Eligible" elseif B2<7 then "A",b2<8 "B", b2<10 "C", if(and (B1<2,B2<7),"D",if(b2<8,"E",if(b2<10,"F", if(and(B1<3,B2<7),"G",if(b2<8,"H","I"))))).

    How can i make if statement where i need to check multiple conditions.

  27. Greeting,
    I'm in kind request of your assistance,
    I am working with stock which i normally issue out weekly.
    i have different columns, opening balance, quantity received, quantity issued, closing balance among others. you realise i have a formula in the 'closing balance' column that automatically calculates; (=opening+received-closing). i have another column 'number of days out of stock'. this column includes the number of days for which the item had stocked out. example: if the i opened with 30 items on 1st march, i received 20 on 10th, issue out all the 50 on 21st then days out of stock is 31-21=10 if more is received on 25th then days out of stock will become 25-21=4.
    i want a formula that will automatically read when the 'current stock' column becomes zero and then subtracts to return the days out of stock.
    (i dont mind if the formula i am looking for assumes all months have 30 days)
    thank you in advance

  28. This is probably impossible, but I have 2 possible cost bases which generate rates of return. I need a conditional statement that says, if cost base is 1, then return is x%. If I set cost base to 2, the number in the cost base 1 result cell remains at x% - ie, I do not want it to report "FALSE"
    A B
    1 Cost base = 1, result = 15%
    2 Cost base = 2, result = 20% but cell B1 remains at 15%

    At the moment I have to copy and paste the results as values, but hope to shortcut this.

  29. Hi there,

    I'm trying to check multiple keywords and return if they feature A, B, C.

    =IF(ISNUMBER(SEARCH("sale",A:A)),"Buyers","false")

    I can't seem to extend this formula to nest multiple IFs. Any idea what I'm doing wrong, this is my attempt to extend the formula:

    =IF(ISNUMBER(SEARCH("sale",A:A)),"Buyers","false",IF(ISNUMBER(SEARCH("rent",A:A)),"Renters,""))

    thanks!

  30. if I would like to return an amount, that must meet 2 requirements/conditions form 2 other cell, how do I do that.

  31. ABCD 563 443 CLOSED
    563 443 #VALUE!
    ABCD 563 443 CLOSED
    ABCD 563 443 CLOSED
    ABCD 563 443 CLOSED
    OPEN will not show
    OPEN will not show

    If column A1>1,"open","" will show in G1"open" or blank

    but IF(AND(B1>1,C1>1,"closed","", will show in G1 "closed" or blank

  32. I am trying to build a formula to tell me if an employee has exceeded their earned vacation balance cap. The maximum caps differ depending on their years of service. Employees with 0 to 5 years (or less than 10400 seniority hours) have a cap of 120 hours; employees with 6 to 10 years (more than 10400 but less than 20800 seniority hours) have a cap of 180, and employees with 11+ years (more than or equal to 20800 seniority hours) have a cap of 240. Can anyone help me build a formula to check the balance cap based on years of service or seniority hours? I was able to create an IF formula to determine the amount of vacation time earned each pay period based on seniority, but the formula for the cap is stumping me.

  33. Condition
    1) If employee Basic salary is less than 40% of his total salary than his basic salary should become 40%
    2) If Employee salary is more than 40% , his basic salary should neither increase or decrease but should not go below 40% of his total salary any given point of time

  34. Hi!
    I'm trying to create a macro that will look at 2 cells validate if they agree if so, deliver the variance of the cells next to it to a specific cell, if it does not agree deliver the value of 0 in the these cells. then continue on to the cell below and do the same thing. I have a group of cell that have values and some days there are 7 and other days there may be just 4 but i need to ensure i am validating all everything. It has been sometime since I've done anything in VB.when i run it i get a compile error of Else without If. Hope this all makes sense. Below was what is used as my code. thank you!

    If B6 = B20 Then I6 = C6 - C20 & J6 = D6 - D20
    ElseIf B6 B20 Then I6 = "0" & J6 = "0"
    If B7 = B21 Then I7 = C7 - C21 & J7 = D7 - D21
    ElseIf B7 B21 Then I7 = "0" & J7 = "0"
    If B8 = B22 Then I8 = C8 - C22 & J8 = D8 - D22
    ElseIf B8 B22 Then I8 = "0" & J8 = "0"
    If B9 = B23 Then I9 = C9 - C23 & J9 = D9 - D23
    ElseIf B9 B23 Then I9 = "0" & J9 = "0"
    If B10 = B24 Then I10 = C10 - C24 & J10 = D10 - D24
    ElseIf B10 B24 Then I10 = "0" & J10 = "0"
    If B11 = B25 Then I11 = C11 - C25 & J11 = D11 - D25
    ElseIf B11 B25 Then I11 = "0" & J11 = "0"
    If B12 = B26 Then I12 = C12 - C26 & J12 = D12 - D26
    ElseIf B12 B26 Then I12 = "0" & J12 = "0"
    If B13 = B27 Then I13 = C13 - C27 & J13 = D13 - D27
    ElseIf B13 B27 Then I13 = "0" & J13 = "0"
    End If

  35. Hey There,

    I am trying a formula that,
    one cell is having the same details of other selected cell by putting "=" but in the same cell how I include the formula if the selected cell is blank and in that case I can put "NA". Example,

    In cell A1 is having a drop down list of material
    In cell B1 I can put B1=A1, that means what ever the name of material will appear in Cell B1. Now If there is no value in cell A1 then how I include the "NA" in formula of cell B1. So that if there is material name than that will appear on cell B1 but if there is nothing then the Cell B1 will appeared as "NA".
    If you can help me it will be very helpful for me.

  36. I am trying to calculate the following, the formula is in cell E3. Drop downs in cell G3 containing Premier and Elite with associated values of 1.5 for Premier and 1 for Elite. These selected values of 1.5 or 1 are loaded into cell E3 after being selected.

    =IF(G3="Premier",1.5,IF(G3="Elite",1,IF(ISTEXT(I3),E3*0.5))

    Everything works fine except for the Istext function. If any text is found in I3 then I want to apply a division formula to reduce the resulting value in the E3 cell by 50%. The values of E3 should then be .75 for Premier and/or .5 for Elite if text is found in I3. What may I be doing wrong?

  37. Sir I have 3 if condition statements I want join them and want to make single condition kindly help me on this

  38. Try this instead
    =IF((OR((ISNUMBER(SEARCH("SERETIDE",AA2))),(ISNUMBER(SEARCH("SYMBICORT",AA2))),"YES","NO"))

  39. I'm struggling to combine IF function with an OR while incorporating text values with partial match.
    This is what I've gotten so far, but I'm not sure why it doesn't work.

    =IF((OR((ISNUMBER(SEARCH("SERETIDE",AA2))),(ISNUMBER(SEARCH("SYMBICORT",AA2)))),"YES","NO"))

    Thank you for the help.

    1. Try this instead
      =IF((OR((ISNUMBER(SEARCH("SERETIDE",AA2))),(ISNUMBER(SEARCH("SYMBICORT",AA2))),"YES","NO"))

  40. 95% to 100% Silver
    100% to 102% Gold
    102% to 105% Diamond
    > 105% Platinum

    in slab calculation range for (95% to 100 % )

    how is work

    1. Hello,

      Please try the following formula:

      =IF(A1>105,"Platinum",IF(A1>102,"Diamond",IF(A1>100,"Gold",IF(A1>95,"Silver",""))))

      Hope this will work for you.

  41. 95% to 100% Silver
    100% to 102% Gold
    102% to 105% Diamond
    > 105% Platinum
    in slab calculation is value from to (95 % to 100%)

    how is do

  42. Has anyone attempted the MOS Excel Expert Part 2 if so can anyone help me with the question that ask to divide column D by Column E. Then use a Nested If and Roundup Function to roundup to the nearest integer.

  43. Hi, wondering if anyone could help me.

    I need one cell to equal LL. If the value in another column is equal to 3.90, 4.90, 5.45, 5.95 or 11.40 I need the column next to this value to equal LL. I can do it with one value but not with all the values?

    Thanks,

  44. I am trying to create a formula that will first multiply a weight times a dollar amount then add a value from one of 4 columns where a choice needs to be made and an additional column that will be added regardless. These 'choice' columns are not cumulative they are exclusionary. If one has a value then non of the others will be added to the weight times dollar amount and the additional column.

    In a sentence it looks something like this:

    (weight*.65)+L13 if P13=FALSE)+(M13 if L13=0 and if P13=FALSE)+(N13 if L13=0 and if M13=0 and if P13=FALSE)+O13 (This is the column that is always added) if P13=80 (weight*.65)+O13+P13

    Thank you!

  45. I have this formula =VALUE(IF(B4="high risk", "5", IF(B4="restricted industry", "5", IF(B4="medium risk", "3", IF(B4="low risk", "1"))))) imbedded so it will assign the numerical value once a selection is made from the drop down list next to this field. However, I have new data (a lot of options in the drop down now) and need the above formula to look for a partial match instead of an identical match. For example, instead of high/med/low wording, I know have a list of countries that have attached ratings like "Estonia-Low". And I need that formula to assign the numerical risk rating (5/3/1) based on a partial match for the Low/Medium/High that will be attached to the country name. Thank you so much for your help. I've been reading blog posts all night and can't figure it out.

  46. =IF(((HLOOKUP(Y$1,Patterns!$AS$2:$AW$42,Patterns!$AP33,0))*((Forecasts!$AI$1*Y266)+Forecasts!$AJ$1))<1,1,((HLOOKUP(Y$1,Patterns!$AS$2:$AW$42,Patterns!$AP33,0))*((Forecasts!$AI$1*Y266)+Forecasts!$AJ$1)))

    Can someone help me with this formula? What is it trying to achieve?

  47. Hi, can you have more than one condition to get a same result? I have a range of prices, and essentially if the price is above a certain value, a 0 score, is given. However, I want to also give a 0 score if there is no price, or the price is blank.... =IF(K218.75,"0")))))))))))))
    I want to add that if K2 is a 0 price, or if K2 is blank, my formula must also revert with a 0 value. Thanks for any help

    1. Hello,

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

      =IF(OR(K2>18.75,K2=0,ISBLANK(K2)),"0")

      Hope this will help.

  48. Hello,

    I have a column of names and another column with a value. I am trying to build out a formula that will capture the the value in the row depending on the name. Something like "IF"Tricia,sumF15".

  49. I am trying to find a way to indicate if there is >10 consecutive duplicate values in a column and if so have a cell marked as yes but if no then have the column show a no. An example can be seen below of what I want it to look like.
    A1 B1
    Y N
    N N
    Y Y
    Y Y
    Y Y
    Y Y
    Y Y
    Y Y
    Y Y
    Y Y
    Y Y
    Y Y
    Y Y
    Y Y
    Y Y
    N N
    N N
    N N
    N N
    N N
    N N
    Y N
    Y N

    Is there a way to get an equation that looks at consecutive duplicate values and flags them if there is higher that a set value?

    1. Hello,

      If I understand your task correctly, please try to enter the following formula in cell B1:

      =IFERROR(IF(COUNTIF($A1:$A11,$A1)=11,"Y",IF(AND(OFFSET($B1,-1,0)="Y",OFFSET($A1,-1,0)=$A1),"Y","N")),"N")

      Just select the cell where you've entered the formula and drag the fill handle (a small square at the lower right-hand corner of the selected cell) down.

      Hope this will help.

  50. I really need a summary for 4 conditions but have a problem like this

    if A4C4 or equal D4 then D4
    if A4>D4 or equal E4 then E4
    if A4>F4 then F4

    Help me pls.

    1. I really need a summary for 4 conditions but have a problem like this

      if A4C4 or equal D4 then D4
      if A4>D4 or equal E4 then E4
      if A4>F4 then F4

      Help me pls.

      1. 01 - if A4C4 or equal D4 then D4
        03 - if A4>D4 or equal E4 then E4
        04 - if A4>F4 then F4

        1. Hello,

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

          =IF(OR(A4>C4,A4=D4),D4,IF(OR(A4>D4,A4=E4),E4,IF(A4>F4,F4,"")))

          Hope this will help.

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