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 8. Total comments: 650

  1. Hi,

    Please help me to solve this
    Deposits Lots Category
    150,000 1,750 Platinum
    50,000 1,000 Gold
    25,000 200 Silver
    If both Column A & B satisfied the respective category should be displayed.

    Thanks in advance

  2. Help! I need a formula that helps with the following:
    I have an average formula in a cell G4 (averaging B4:F4)
    I need to have a functional formula that does:
    If G4 is between 1.0-1.5, then 1
    If G4 is between 1.6-2.5, then 2
    If G4 is between 2.6-3.5, then 3
    If G4 is greater than 3.6, then 4

  3. I am getting "False" forthis formula.
    Advice on how to correct it please ?

    =IF(AND(AF2="Incomplete",BE2=""),"Not Done",IF(AND(AF2="Negative",BE2=""),"Negative",IF(AND(AF2="Positive",BE2=BE2:BE5),"Done")))

  4. So I use to work for a company that I helped them out with replacing parts on their machines when it got within a certain date range. I did this using excel and its the only one that I did. I currently working on something similar where lets say there is an end date of 1-6-2020 and I need a formula that gives me a red flag when the actual date gets within 30 days of that June Date. I can't remember how the formula goes. could anyone give me a little bit of advice?

    1. Assuming the end date is entered in A1:
      =IF(TODAY()+30>=A1,"Deadline coming up","Still enough time")

  5. =IF(H2>=$F$1;IF(H1="NED";"NE";IF(H1>=$F$1;"DA";));"NE")
    i need to add another IF- if it is "SUB" then "NE"
    (H1="NED";"NE";IF(H1>=$F$1;"DA";));"NE")-> this but with SUB, and it needs to fit in the formula on the top
    pleeeease

  6. Hey I need some help, is it possible to fetch the below data with formula.
    I have a length formula in column b which is returning various values from col A. 17,14,13
    In case of 17 i have two arguments to check simultaneously,
    1. check the 4th character if it is "-" (hyphen) then mid(5,10)
    2.check the 14th character if it is "-" (hyphen) then mid(4,10)
    in case of 14 i have 4 arguments to check simultaneously,
    1. look for 4 character to be "-"(hyphen), then need right(10)
    2. look for 4 character to be " "(space), then need right(10)
    3. look for 11 character to be "-"(hyphen), then left(10)
    4. look for 1 character to be "*"(star shift8), then right(10)
    in case of len 13 2 arguments
    1. look for 11 character to be "-"(hyphen), then left(10),
    2. right(10)
    Can all the above arguments can happen with 1 if function starting in column c
    Please help

  7. Amazing !!!!
    Excellent !!!
    Great !!!

  8. Hello,
    I am attempting to figure out a formula for accessing lieu and vacation time accumulated and taken.
    If an employee has used up all lieu and I need time taken to start drawing from vacation what would be the formula?
    E.g. Employee has 15 lieu hours and 30 vacation hours.
    They take 16 hours off.
    The time has to come off lieu first then pull from vacation.

  9. Hi,

    I have a query, the below works but I need it to cover two ranges B38@B57 and G38:G57 rather than just the individual cells in each case, but when I input that I get #VALUE!
    Can anyone advise?

    =IF(B38="","Available",IF(G38="","Off Sick",IF(B38="",G38="","Available2")))

    Many thanks

  10. HI,
    I have a question, I want to do a calculation for Logistics (Port Storage charges) these amounts changes every few days. The Number of days in port I have however how to calculate the following in af formula?
    From day 1 until day 11 = USD 0,00 per day
    From day 12 until day 20 = USD. 2.00 per day
    From day 21 until day 40 = USD 9.00 per day
    From day 41 until day 70 = USD 25.00 per day
    Over 70 days = USD 42 per day

  11. Hi,
    I have the following formula that works fine:
    =SUM(IF(G4="Rad",4,IF(G4="Green",3,IF(G4="Blue",2,IF(G4="Yellow",1,Good))))/COUNTA(G4:J4))

    where
    Red = 4
    Green =3
    Blue = 2
    and Yellow 1
    are a selection from dropdown list to calculate a percentage based on the selection.
    I want to apply this formula for entire row.

    what I did is below:
    =SUM(IF(G4="Rad",4,IF(G4="Green",3,IF(G4="Blue",2,IF(G4="Yellow",1))))
    +(IF(H4="Rad",4,IF(H4="Green",3,IF(H4="Blue",2,IF(H4="Yellow",1))))
    +(IF(I4="Rad",4,IF(I4="Green",3,IF(I4="Blue",2,IF(I4="Yellow",1))))
    +(IF(J4="Rad",4,IF(J4="Green",3,IF(J4="Blue",2,IF(J4="Yellow",1))))/COUNTA(G4:J4))

    It will be hard if have 30 or 50 cells,

    so is there a way to do it by selecting the range instead and each cell manual

  12. condition 1 = Sum Insured
    condition 2 = Age Bracket
    Result = Premium
    How to input the formula?
    Premium given in excel sheet in different row according to age bracket

  13. Is it possible to abbreviate the formula when non-consecutive numbers are used? I have a sheet where I need to assign 12 department numbers to one of three groups, with a 4th group as a catch all for outliers. The department numbers are not sequential.

    So for instance can I say IF(B2=(211,224,266,267),"Group A",IF(B2=(286,216),"Group B",IF(B2=(210,268,288,270,218,225),"Group C","Group D")))) it doesn't work. Do I need to write out a really long formula with all possibilites? What would that look like?

  14. I cant do thes if statement

    cash back
    example 1 amount 5000 70
    example 2 amount 6500 110

    from to of amount max to give
    1000– 3000 1% 30
    4,000 - 6000 2% 80
    6,000 - 10000 4% 240
    10,000 - 15000 7% 700
    15,000 - Open 12% 1800

  15. My result returns #VALUE! how do I get around that?
    =IF('ADPR -AWARDS KDG L J TRANSITION'!L10<19000,'ADPR -AWARDS KDG L J TRANSITION'!A10*'ADPR -AWARDS KDG L J TRANSITION'!F10,0),IF('Benef Ovr Grid'!E3,'ADPR -AWARDS KDG L J TRANSITION'!L10-19000,0)

  16. need an if statement that uses if c2 starts with '00' rather than typing out long names

  17. I am grading a test and some questions have multiple answers and the answers are two characters. How do I look up answer (NM) in cell A1 and (ND) in cell B1 to the answer key that had (NM) in cell M1 and (ND) in cell N1? In order to be correct, both answers (NM &ND) have to be provided and does not have to be in any order. An I do this with an If then statement?

  18. I have a spreadsheet calculating months of service to clients. They can have a start date, a suspended date, a restart date and an exit date. The service may have never been suspended so the suspended date and the restart date could be empty. There could be a suspended date and never restart so the exit would be the same as the suspended date. I am trying to calculate the total months of service to each client. How can I write an if/or statement to tell it to use start date then suspended date then restart date then exit date, but to ignore there is no suspended date, but to use start and suspend date if there is no restart date? This is what I have so far: =(DATEDIF(D2,E2,"D")+DATEDIF(F2,I2,"D"))/30

  19. Hi, I would like to kindly request some assistance.

    Is there any formula that can select a few cells below a VLookup result if a certain condition is met? Example VLOOKUP result is cell D10 but if the amount in cell E10 is >1, then the Vlookup should pull the result in cell D15. Appreciate any advice. Thank you so much

  20. I need TO USE IF CONTIONS WITH 15 CONTIONS HOW I CAN GET WIHT TEXTS

  21. I need TO USE IF CONTIONS WITH 15 CONTIONS HOW I CAN GET

  22. Hello, Im looking to insert a nested IF function but only on blank cells of a column. Any idea?
    I Know how to fill out blank spaces with a value, but not with a formula.
    Thanks in advance!

  23. Need help to select items from column A with respect to range of items available in D column using if function.
    =if(A:A=range excluded plants,"YES","NO")

    PLANT Excluded Plants
    1 1052
    2 1014
    3 1033
    4 1015
    5 1018
    6 1017
    7
    8
    9
    1014

  24. Any help would be appreciated, i want to look at a cell and if it meets the criteria of GMBH or INC INC then it looks up the cell reference otherwise returns N/A but cant' get it to work.

    =IF(D708="GMBH",IF(D708-"INC", VLOOKUP('2018 Margin Data'!A$1:A$65536,'Master Margin'!$A$4:$T$983,17,0),"N/A"))

  25. I have an excel sheet in which "C1" column is "MODEL" & "D1" column is "LANDING".
    Another side I have created a list of MODELS in "Q1" column & LANDING PRICE in "R1" column.
    I want a formula...that if I type a model number in column "C2" landing will automatically will put in column "D2"

    1. I have an excel sheet in which "C1" column is "MODEL" & "D1" column is "LANDING".
      Another side I have created a list of MODELS in "Q1" column & LANDING PRICE in "R1" column.
      I want a formula...that if I type a model number in column "C2" landing will automatically will put in column "D2"
      And If I type any model number in the column "C2" landing price automatically will come to the column number "D2"

  26. Hi, I have two conditional parameters..
    The simple formula is: =IF(F19<=15; F18*F19*72; IF(F1930; F19*F18*72*0,91)))
    Where:
    F19 is number of days.
    F18 is number of cats.

    But I need another one when is more then 1 cat, so for each extra cat the value is $20, and not the same price of one. How do I work a formula with more then one condition parameter?

  27. Hi,
    Is there a way to write the formula below in Excel? The percentage ranges are column headings not individual cells.
    =if(B6 is greater than 5% but less than 10%,E4,if(B6(greater than 10% then F2,if(B6 is less than 5%, B3,error)))

  28. Hi
    I'm hoping you can help me with a formula for this
    if A1:A2="","" if A1="" & A2 = X,"O" if A1:A2 = X,"X"

  29. I need to do a formula that will look at a range of columns on a specific row and if a value then give data from that column with value row 2, where the column with value is different row.

  30. I have 2 sheets in excel, the first carrying the data and the second where the data will be placed. I am to compute the fuel consumption of the different types of equipment however there are types of equipment in the first sheet which has the same dates and have to be added together in a single cell in the 2nd sheet. Which formula should I use to compute it?

  31. =IF(H39>99,"5000",IF(H39>89,"4500", IF(H39>79,"4000", IF(H39>69,"3500",IF(H39>59,"3000", IF(H39>49,"2500",IF(H39>39,"2000", IF(H39>29,"1500", IF(H39>19,"1000", IF(H39>9,"500","NOT ELEGIBLE"))))))))))

    1. I have made a formula to conduct screening work from data and that is
      =IF(J13=167.64;30;IF(J13=168.91;32.5;IF(J13=170.18;35;IF(J13=171.45;37.5;IF(J13=172.72;40;IF(J13=173.99;42.5;IF(J13=175.26;45;IF(J13=176.53;47.5;J13>=177.8;50)))))))))
      but it shows that the formula is too large.
      how can I reduce it.
      Seeking help from any one.

      1. I think the issue you are having is you are using ";" to separate you if statement. You should us "," instead. Let me know if this works for you.

        James

  32. Hello
    I am trying to write a formula for a behavioural rating at a given time point (second by second) where a rating is available for a given time range. So if the time point falls withing the range then the relevant behavioural rating applies, but if it falls in the next time range then a different behavioural rating applies. I hope this makes sense?! So Column 1 = behavioural rating, column 2 & 3 = the time range in which that behaviour occurs, column 4 & 5 = one second time range and I want column 6 to apply the behavioural rating that is associated with the value in column 5 (it's okay to ignore column 4). Any assistance is greatly appreciated.
    Kindest regards :)

  33. Thanks a lot...this helped me really !!!

  34. Hello!
    I'm trying to create a nested formula with 12 arguments. example, farmer, hair dresser, okada driver, pastor, teacher, student, trader, petty trade, agricultural activities, tailor, and banker. I want to group this into 4 groups using the nested IF formula like this: =IF(columnH=farmer,hair dresser,okada driver,pastor,"Baseline2016",IF(columnH=teacher,student,trader,petty trade,"Baseline2016",). But the formula isn't working, please help.

  35. I am trying to write a formula to look in cell V1, if the value = 11 or 12 and V3 is less than 25 in V73 I want the result to read 25, but if V1 = 16 and the vale is less than 28 I want it to read 28.....when I have 16 in V1 the formula I am using does not work....any help would be greatly appreciated. Here is my current formula:

    =IF(OR(AND(V1=11,V73<25),AND(V1=12,V73<25)),25,V73)*(OR(IF(V1=16,V73<28),28,V73))

  36. Svetlana Cheusheva mam please hlep i have table in which i will waive charges on those which are lay at our company after 7 days but which i used if formula then system calculate amount less then seven days its shows amount in minus i want to stop this and system reflected 0 amount instead of amount in minus kindly help and guide me thanks
    my formula is following and just add the above condition if possible.
    =IF(C7=20,H7*750,IF(C7=40,H7*1500,IF(C7=45,H7*1750)))

  37. Svetlana Cheusheva mam please hlep i have table in which i will waive charges on those which are lay at our company after 7 days but which i used if formula then system calculate amount less then seven days its shows amount in minus i want to stop this and system reflected 0 amount instead of amount in minus kindly help and guide me thanks

  38. Hello,
    What is the wroung in this formula plz help
    =IF(F5>=100%,IF(I5>=100%,"1.0%",IF(F5>=100%,IF(I5=85%,IF(I5>=100%,"0.20%",IF(F5=100%,"0.00%",))))))))

  39. HI

    I have 4 scenarios I'm working with and created 4 columns with these formulas, which all work.
    =IF($EJ5="","",IF(AND($BF5="y",$EJ5"",$EA5="A"),$EJ5&" - A, "&$EH5,""))
    =IF($EJ5="","",IF(AND($BF5="n",$EJ5"",$EA5="A"),$EH5&", "&$EJ5&" - A",""))
    =IF($EJ5="","",IF(AND($BF5="y",$EJ5"",$EA5=""),$EJ5&", "&$EH5,""))
    =IF($EJ5="","",IF(AND($BF5="n",$EJ5"",$EA5=""),$EH5&", "&$EJ5,""))

    And then I created a 5th column with: =EL5&EN5&EP5&ER5 so the results are in one column.

    Is there anyway to take the 4 column formulas and merge them into one column.... not doing it the manual way I created?

    Thanks,

    Lisa

  40. How would go about writing an excel formula for the following:

    Start Date must be later than April 1st following the calendar year in which you attain age 70 1/2.

    Eg DOB = 10/17/1954, Age 70 1/2 = 04/17/2025 the start date would be 04/01/2026 because the Age 70 1/2 date is after 04/01 and has to go to the following year.

  41. I am trying to use IF function to assign different ore types to different stockpiles. The ore types are based on source of material( PIT A, PIT B or PIT C), type of material (FRESH, TRANSITION or OXIDE), and the grade of the ore (HIGH or LOW).

    For example, I want to allocate High Grade Fresh Material from Pit A to stockpile F12, and High Grade Oxide Material from Pit B to stockpile F15 and so on

  42. I need help. I am trying to come up with a formula for a grading system, but there are two factors involved.

    For the students grades they have two categories that they have Summative and Synthesis.

    To get Honors, they need to get 72 pts in Summative and 18 pts in Synthesis
    To get High Pass, they need 68 pts in Summative and 17 pts in Synthesis
    To get Pass, theye need 56 pts in Summative and 14 pts in Synthesis.

    Help please. What formula would I use for that. I already have the calculations for each students summative and synthesis grades, just need to get their letter grade.

  43. I'm trying to set up a nest. One column is why and if order error is chosen, then I'd like the next column to give me a drop down of choices for only that answer. Such as: Customer Service
    Sales, Dealer. Any ideas

    1. Hello, Lynnie,

      Unfortunately, it is not possible to solve your task using standard Excel tools and functions. Most likely you need a special macro. I am really sorry we can’t help you with this.

      You may try to find the solution in VBA sections on mrexcel.com or excelforum.com.

      I wish I could assist you better.

  44. Hi...
    I want to check two conditions, e.g. if associate contract end date is less than today then i want result "LEFT" and if associate has put resignation and his LWD is entered in cell then i want result "LEFT" and if if contract end date is not less than today then want result "ACTIVE" and if contract end date is not less than today but his LWD is entered in LWD cell then want result "LEFT".

    Please give formula for the same.

  45. I need to write a formula that checks two columns for values and return one of three values based on the results. Specifically:

    - If the two column cells are null, return a null.
    - If they both have a value of zero, return the number 0.
    - Otherwise if the first cell is greater than zero, return the first cell divided by the second.

    I've tried several formulae, using both AND and IFBLANK. The most concise to illustrate what I want is:

    =IF(AND(B132=””, C132=””),””, IF(AND(B132=0, C132=0),"100%", IF(B132>0,C132/B132,0)))

    All of the individual bits work, but I can't seem to string them together without making syntax errors. I get either a "too many arguments" error or a name error.

  46. Stefanie:
    Try entering lowest variable to highest and check the logic of the statement. Something like this where the data is in A2:
    =IF(A2<65,"Less Than 65%",IF(A2<=69,"65%-69%",IF(A2<=70,"70%-79%",IF(A2<=80,"80%-89%",IF(A2<=90,"90%-100%","Fail")))))

  47. Hello -

    I am wondering why the formula I copied from above is not picking up the various conditions, rather only returns "Fail" for all rows.

    =IF($Z2>89,"90%-100%",IF($Z2>79,"80%-89%",IF($Z2>69,"70%-79%",IF($Z2>64,
    "65%-69%","Fail"))))

  48. Hi, and thank you for all of the above, but still having an issue:

    E134 Review Posted F134 No
    E135 Job Posted F135 No
    E136 Work Complete F136 N/A
    E137 Overtime F137 Yes

    I now need to Executive Summary Cell C150, to show all those equal in Col F to No, but to show whats in Col E, through the use of IF and CONCATENATE as there will be several responses (Col E to fit into Cell C150

    IE Cell 150 to show Review Posted
    Job Posted

  49. HI,I have the followimg information.

    political political party.
    if Bosco NRM,
    BESIGYE FDC,
    BOBO POWERESS,
    MAO DP
    KAMYA FDC
    OTUNU UPC
    MUNTU FDC
    RUGUNDA NRM,
    OTAFIRE NRM

    Use nested if function to assign each of them the respective political party.Assuming that entries start from cell A1.
    thanks.

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