IF is one of the most popular Excel functions and very useful on its own. Combined with the logical functions such as AND, OR, and NOT, the IF function has even more value because it allows you to test multiple conditions in desired combinations. Continue reading
Comments page 2. Total comments: 222
Hi there, im trying to give a single cell a number value based off 2 words. Ive tried the IF but cant seem seem to figure it out. I want
Cell F3 to give a number 2 if its a "W" and cell F3 also to give me a -1 if the text is a "L". Ive done IF(f3="w",2) and it works but cant figure out to add the "L" portion to the formula
Hi! The answer to your question can be found in this article: Nested IF in Excel – formula with multiple conditions. Try this formula:
=IF(F3="W",2,IF(F3="L",-1,""))
Hey, so I am having troubling writing an if statement. I tried using concrate with it also so I can reflect two different outcomes. But everytime I create a formula it only reflects one option of what I wanted.
For example I was using :
=if(or(e1=“sw turnstile in”,”se lby turnstile in”, “in”,”out”),if(or(e1=“sw turnstile out”,”se turnstile out”,”out”,”in”)))
Hey, read carefully in the article above how to use the OR function correctly. For example,
OR(e1=“sw turnstile in”,e1=”se lby turnstile in”, e1=“in”,e1=”out”)
I need a "IF" formula for
If 10mm then (-)1
If 15mm then (-)1.25
If 20mm then (-)1.75
Hi! The answer to your question can be found in this article: Nested IF in Excel – formula with multiple conditions.
=IF(H7="10mm","-1",IF(H7="15mm","-1.25",IF(H7="20mm","-1.75","")))
Hello,
I am stuck and could really use some help.
On my worksheet that I track e-commerce sales I have each unique item in my store listed, 1 per row in a table. When an item sells the date sold is recorded. All sales are then taken to the post office that day. Some days I might have 2 sales and the next may have 30 sales. I want to try and calculate my cost of fuel divided by the number of shipments I have that day to disperse the overhead evenly. Since the post office is closed on Sunday all sales for Sunday are combined into Monday.
How can I state that IF date sold = Sunday Then Fuel Cost is zero, (AND/OR) Monday = Sunday sales + Monday Sales, (OR) Tuesday - Saturday are straight countIF calculations?
From some of your other tutorials I came up with the following: =IF(WEEKDAY([@[Date Sold]], 3)<6, (3.5/(COUNTIF(L:L,[@[Date Sold]]))),"0")
For this example: $3.50 is the fuel cost each trip.
Column L is DATE SOLD so once it sells this is populated with that date.
Column W is where I am trying to capture fuel cost, per item where this formula currently lives. It works for returning a proper result (except for Monday) I just don't know whether this is an OR, AND, nesting solution and where to place the arguments? I also cannot seem to get SUMIF to add by groups of dates. Is that even possible to do?
I have tried several combinations of IF & IFS, but I can't seem to get the right order to get Monday to take Sunday and Monday together. I have also toyed around with WORKDAY & WORKDAY.INTL per those tutorials but I obviously don't understand them well enough because I just kept getting errors.
Hello! To combine Sunday and Monday, use an expression like this: WEEKDAY(D1,12)>5
I hope it’ll be helpful.
Hi all,
Good day! Hoping everyone had a great day! Please i need help on a formula. I want to display the result "ASP" if the starting letter starts with ID, IN, CN etc (whatsoever that I declare as long as it starts with 2 letters) otherwise "NON-ASP" for those 2 starting letters not declared on the formula.
Samples
ID0523A2292
IN623PEA-3666
TW623PEA-3677
CN0623MXA-1447
CN0623MXA-1343
IN0623MXA-1438
ID0623MXA-1471
VN0623A2382
VN623PEA-3696
VN623PEA-3697
VN623PEA-3698
CN0623MXA-1518AND
Thank you very mych
Hi! If I understand correctly, extract the first two characters from the text string and perform a math operation on them. The ISERROR function will indicate an error if the value is a letter. Try this formula:
=IF(AND(ISERROR(--LEFT(A1,1)), ISERROR(--MID(A1,2,1))), "ASP", "NON_ASP")
Hi Alexander,
The samples I gave were the actual identifications from my work. If the identification starts with ID or CN or VN or TH (many more combinations) then it will display "ASP" otherwise if not declared then it displays "NON-ASP".
ID0523A2292 - this one should display "ASP" since the 2 starting letter is ID
CN0623MXA-1447 - this one should display "ASP" since the 2 starting letter is CN
MX6756VN-123 - this one should display "NON-ASP" since the 2 starting letter is MX
Thank you,
You would have saved your time and my time if you had described the problem in detail and accurately at once. Use this formula, where H1:H10 is the list of allowed values.
=IF(ISNUMBER(MATCH(LEFT(A1,2),H1:H10,0)),"ASP","NON_ASP")
Dear Alexander,
I hope you are doing well,
I have one question and i need an excel formula for that if possible ,please,
I have to generate a quarterly report for a real estate company and i have contracts for flats, shops, warehouses etc....
So what exactly i want is to make sure if the tenant contract is valid during the report period and how many days is the validation?
For Example,
The reporting period is from 01.01.2023 Until 31.03.2023.
The flat contract period is from 22.02.2022 until 21.02.2023.
So the period i want the excel formula to calculate it is the report period validation during the contract of the flat contract period i mean the period will be from 01.01.2023 Until 21.02.2023 which is "one month which is January+ 21 day from February.
Could you tell me how can i do excel function that generates the return of "1month +21 days"
Thank you in advance.
Hello! If I understand your task correctly, here is the guide that may be helpful to you: Date difference in days, months and years. I hope my advice will help you solve your task.
Want to identify cases in 4 categories, values are in number format, however the IF logic is not giving correct answer,
Expected answer is derived from filter logics at frontend, have created 4 slabs 1 day
have used 3 different formulas however not able to get desired output, Please help to make corrections
test = IF(B3<1,"=1,B3=4,B3<24),"4 to 24 Hrs","test")))
test1 = IF(B3<1,"=1)+(B3=4)+(B3<24),"4 to 24 Hrs","test")))
test2 =IF(B3<1,"=1 + B3=4 + B3=24,"> 1 Day"))))
Lead (Hours) Expected Answer test test1 test2
0.05 < 1 Hour 1 to 4 Hrs <1 Hour <1 Hour
0.09 < 1 Hour <1 Hour <1 Hour 1 Day <1 Hour <1 Hour 1 Day 1 to 4 Hrs <1 Hour <1 Hour
1.02 1 - 4 Hours 1 to 4 Hrs <1 Hour <1 Hour
1.16 1 - 4 Hours 1 to 4 Hrs <1 Hour <1 Hour
22.68 4 Hr to 1 day 1 to 4 Hrs <1 Hour <1 Hour
4.48 4 Hr to 1 day 1 to 4 Hrs <1 Hour <1 Hour
Hi! I can't fix your formulas because I don't understand what result you want. I think you will find useful examples of formulas here: Excel IF function with multiple conditions.
used below formula also with OR condition,
=IF(BE2<1,"=1,BE2=4,BE2<24),"4 to 24 Hrs","test")))
however not matching with expected output
I need help with this formular on excel. Not sure if to use the actual colmmn names. eg Column DK is EBL, DL is CARB and DM is AMP.
Trying to create a new column called GenTY
where if DK is yes and DL is yes and DM is yes then GenTY = "CarbR".
If only DK is yes then GenTY = ESBL-G
If all are "no" then GenTY = "Negative" and so on.
=IF(OR(DK="yes", DL="yes", DM="yes"), "CarbR", IF(OR(DK="yes", DL="no", DM="no"), "ESBL-G", IF(OR(DM="yes", DL="no", DK="no"), "AmpCG", IF(OR(DK="yes", DL="no", DM="yes"), "ESBL/Amp", IF(OR(DM="no", DK="no", DL="no"), "NEG"))))))
Hi! I don't understand what you want to do. If we're talking about named ranges, they can't be created with a formula. Your formula doesn't look like a normal Excel reference.
Hi Alex, I wanted to use Excel to create a new column in my data set based on a set of conditions. The new column will be created based on variables in columns DK, DL and DM.
The new column is called DN.
So when the value in "DL" is yes then "DN" = "CarbR".
If only DK is yes then "DN" = ESBL-G
If only "DM" is yes then "DN" = AmpC
If either of the column is "no" then "DN"= "Negative".
I hope you understand my question now.
Thanks
I don't understand what "column is called DN" means. Read carefully the article on references in Excel and named ranges.
Hi,
Having a bit of a problem
Sheet 1
1 = 5
2 = 10
3 = 15
Sheet 2
Enter either 1, 2, 3 and get the corresponding values
This works when I enter 2. =IF(C11=2,(SoR!F13))
This doesn't work when I enter 3 but works when I enter 2. =IF(C12=2,(SoR!F13))*OR(C12=3,(SoR!F19))
Hi! The following tutorial should help: Excel nested IF statement - multiple conditions in a single formula. Try this formula:
=IF(C12=2,SoR!F13,IF(C12=3,SoR!F19,""))
Thank you for your help Alexander.
This is my problem. Sheet 1 may have up to 100 entries and I want to select these when I enter the number in a cell in sheet 2
Sheet 1
Item Reference Value
1 10.00
2 20.00
3 30.00
4 40.00
5 50.00
6 60.00
7 70.00
8 80.00
9 90.00
10 100.00
and more
Sheet 2 Input Sheet
Enter any reference from sheet 1 Corresponding Value from sheet 1
1,2,3,4,5,6,7,8,9,10 10,20,30,40,50,60 etc
How do I create a formula for 10 or more items
Hi! Based on your description, it is hard to completely understand your task. However, I’ll try to guess and offer you this guide: Excel VLOOKUP function tutorial with formula examples
You will be able to extract from column B the number corresponding to the value in column A.
I need to send you copies of the spreadsheets. How do I do that?
Hello all,
I appreciate any help.
I'm looking to create a document that can produce multiple values depending on the parties involved and documentation requested from each. For example.
If B2 = A then I need X documents
If B2 = B then I need Y documents
If B2 = C then I need Z documents
If B2 = ... the I need ... Documents so on and so forth for about 10 different scenarios. 10 different possible parties with 10 different possible document names.
Is this possible? I just keep getting "you've entered too many arguments for this function"
Gratefully - Hoyt
Hi! If you have many conditions, use the IFS function.
Please help me out (if one column is Paid or unpaid with conditional formatting then one cell value decreases with the other column amounts how can i use if formula in this scenerio?)
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
HI there,
Been having a hard time getting the hang of this but what I'm trying to do is this:
IF(E10="", "", IF(OR(E10="TOM", E10="BEN", E10="JOY"), 5%, 8%))
----
I wanted to leave the cell "blank" if there's no detail encoded in E10 if not it should check if any of the names matches the list it would result to 5% interest rate, otherwise 8% only.
Hi! If I understand your question accurately, this formula works correctly. If there is a problem, describe it in more detail.
It works but somehow it doesn't apply the 5% interest rate if the cell contains any of the mentioned names. It always return the value of 8%. Not sure why it doesn't end up to 5% if all conditions are met.
=IF(ISBLANK(E10), "", IF(OR(E10="BEN", E10="JOY", E10="TOM"), 5%, 8%))
-----
Tried the above formula but it always result to 8%. I intend to leave the cells blank as much as possible in order not to appear in the printable. If I switch the position of interest rate, the value in "if_value_false" always the end result.
Hi! The formula works correctly. Check cell E10. Maybe there are extra spaces or other characters.
Thanks sir Alex,
I've finally figured out my mistake, it appears that I made the wrong cell reference for my OR Argument, it should be linked to the cell that contains a list of names, that is why it doesn't work function I wanted it to be.
=IF(OR(D5="TON", D5="BON", D5="JOY"), 5%, IF(ISBLANK(E5), "", 8%))
-------
Using the formula above solved my problem...
Thank you so much for this site :)
What if you want a function to calculate if you gonna times by 30 if someone is on self catering(C2) of by 95 if the are B&B catering(C3) if you are given number people in cell C7 are 6 people and number of nights they are 7 on D7 and someone is on self catering but you want a formular so that you can calculate those that are on B&B
Hi! Try to use the recommendations described in this article: Nested IF in Excel – formula with multiple conditions.
I can get this =IF(OR(F2="Awaiting Shop",F2="In Shop"),"VMS","") formula to work but I need to also look at a Table to see if it is somewhere else.
I tried the following that produced a #VALUE! Error
=IF(OR(F7="Awaiting Shop",F7="In Shop"),"VMS",IF(VLOOKUP(@A:A,Location,3,FALSE),""))
Column A has the Name of the truck I'm looking for in the Table named Location, the information I looking for is in the 3rd column of that Table.
Is this possible to do at all?
I Tried =IF(OR(F2="Awaiting Shop",F2="In Shop"),"VMS","") in the table but the table has drop downs and wont work.
Also Tried this formula in the dropdown but produces a 0 in the sheet that Need the information.
Any ideas?
Hi!
Based on your description, it is hard to completely understand your task. However, I’ll try to guess and offer you the following guide: Excel INDEX MATCH with multiple criteria - formula examples. I hope it’ll be helpful. If this is not what you wanted, please describe the problem in more detail.
i have 3 worksheets of part numbers. i want to look up a part number from sheet 1 and see if they exist on sheet 2 and sheet 3, if it does i want it to return a yes. i am a newbie with excel and cannot figure out the formula for this.
Hello!
We have a special tutorial on this. Please see How to VLOOKUP across multiple sheets in Excel with examples.
Hi Alexander,
can you help me please.
i have the following IF/OR formula i'm try to build. Basically its looking up a cell for either ME (Meter),IN (Inch) or CM (Centimeter). if ANY of the dimensions are greater than 1.2 (ME), 120(CM) or 47.2 (IN) there is a value of 70. if not, the value is zero.
can you see where i'm going wrong on this
=IF(OR(AP3202="ME",AP3202>1.2,AQ3202>1.2,AR3202>1.2),"70","0"),IF(OR(X3202="CM",AP3202>120,AQ3202>120,AR3202>120),"70","0"),IF(OR(X3202="IN",AP3202>47.2,AQ3202>47.2,AR3202>47.2),"70","0")
help much appreciated.
thanks,
Damien
Hi!
I do not have your data, so it is difficult to understand your formula and impossible to check it. However, check in the first OR condition: AP3202="ME",AP3202>1.2
Hi I am trying to get a formula for this:
-produce the label 'points if either a reservation's Total Tour Price exceeds 300 or has more than six(6) persons in the tour party. Otherwise leave the cell blank
I tried but getting it incorrect. Thanks
Hi!
Please re-check the article above since it covers your case.
Hi there
Please Suggest I have a few criteria
There are 3 column A= Inventory on Website, B= Inventory In Hand and C= reserved qty (B-5)
Need to write a formula where, If A is greater than C then need to correct Website inventory and if C is 0 or less than 5 then update as out of stock and if C is greater than A and greater than 5 then, update inventory
Hi!
The answer to your question can be found in this article: Nested IF in Excel – formula with multiple conditions.
For example:
=IF(A1>C1,"correct", IF(C1<=0,"stock", IF(C1>A1,"inventory","")))
This is great article & very helpful,
I am a beginner and tried to correct one of below formula on my own and it takes time.
=IF(C5="Mon";" ";OR(B11="Apple";B11="Banana");C11*1))
Or other way
=IF(C5"Mon";OR(B11="Apple";B11="Banana");C11*1;" ")
in C5 I have name of the day like Mon, Tue, Wed etc.
in B11 I have a fruit names like Apple, Banana, Grapes etc.
in C11 I have number of kilo
I tried several combinations of the parentesis as well as AND, NOT functions but no luck.
this is the problem;
- if it is a "Mon" don't calculate kilos of these fruits.
- if it is not a "Mon" calculate kilos of only these fruits
if is this kind of formula possible for kind of problem? and would you please help on this.
Thank you very much in advance
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(C5="Mon"; OR(B11="Apple";B11="Banana"));"";C11)
If you want to calculate the sum for these fruits, use the SUMIFS function. I recommend reading this guide: Excel SUMIFS and SUMIF with multiple criteria – formula examples.
Hi! Alexander,
Thank you very much for your reply.
The above formula did not worked thru but I add one more if(..) in the middle and it worked
=IF(AND(C5="Mon",if(OR(B11="Apple";B11="Banana"));"";C11)
Thank you very much.
Hi,
Helpfull article!
I have 6 variables in total. Only one variable will actually be found each time and then I would like that specific variable back in text.
*have to use ";" instead of comma's in my excel.
Doing this now, but not working:
=IF(OR(ISNUMBER(SEARCH("Var1";A28));"Var1");
IF(OR(ISNUMBER(SEARCH("Var2";A28));"Var2");
IF... etc. ))
Hello!
You can use nested IF formula
=IF(ISNUMBER(SEARCH("Var1",A28)),"Var1",IF(ISNUMBER(SEARCH("Var2",A28)),"Var2",IF(ISNUMBER(SEARCH("Var3",A28)),"Var3","")))
If you have many conditions try using the IFS function instead of multiple IF:
=IFS(ISNUMBER(SEARCH("Var1",A28)),"Var1",ISNUMBER(SEARCH("Var2",A28)),"Var2",ISNUMBER(SEARCH("Var3",A28)),"Var3")
I hope my advice will help you solve your task.
Hi need help. I would want to automatically get the rates when these combinations are selected. Please see table. Thank you so much in advance.
Service Paper Size Print Color Rate
Print - Plain TEXT Letter Grayscale | B/W 5.00
Print - Plain TEXT A4 Grayscale | B/W 5.00
Print - Plain TEXT Long / Folio Grayscale | B/W 7.00
Print - IMAGE (Half page) Letter Grayscale | B/W 7.00
Print - IMAGE (Half page) A4 Grayscale | B/W 7.00
Print - IMAGE (Half page) Long / Folio Grayscale | B/W 10.00
Print - IMAGE (Half page) Letter Colored 12.00
Print - IMAGE (Half page) A4 Colored 12.00
Print - IMAGE (Half page) Long / Folio Colored 15.00
Print - IMAGE (Full page) Letter Grayscale | B/W 10.00
Print - IMAGE (Full page) A4 Grayscale | B/W 10.00
Print - IMAGE (Full page) Long / Folio Grayscale | B/W 12.00
Print - IMAGE (Full page) Letter Colored 15.00
Print - IMAGE (Full page) A4 Colored 15.00
Print - IMAGE (Full page) Long / Folio Colored 20.00
Print - Digital photo 4R Colored 30.00
Photocopy Letter Grayscale | B/W 5.00
Photocopy Letter Colored 7.00
Photocopy A4 Grayscale | B/W 5.00
Photocopy A4 Colored 7.00
Scan 10.00
addt'l - Editing 3.00
Hello!
You can find the answer to your question in this guide: Extract a substring after the last occurrence of the delimiter
=RIGHT(A2,LEN(A2)-SEARCH("$",SUBSTITUTE(A2," ","$",LEN(A2)-LEN(SUBSTITUTE(A2," ","")))))
Thank you for this but I am not looking for the delimiter. What I am trying to get is the "RATES". For instance if I input "Print - Plain TEXT" on "SERVICE" then "Long / Folio" on the "PAPER SIZE" then "Grayscale" on "Print colour" it will get me automatically the "RATE" of 7.00..
Hi!
From text: Print - Plain TEXT Long / Folio Grayscale | B/W 7.00 - formula extracts 7.00
If it is not a single text string but several cells, which you did not mention, use these guidelines: Excel INDEX MATCH with multiple criteria.
Hey Alexander Trifuntov ! Thank you so much for the help. Works really great! Awesome! Just as the result I really wanted. :D
I am trying to sum a range of cells if another range of cells says either yes or no. If yes then sum the cells, if no, then subtract the amount in that cell. Can someone help?
Hi!
You can also find useful information in this article: How to use SUMIF function in Excel with formula examples. I hope it’ll be helpful.
doc_no frm_date to_date missing date
1662450337 01-Apr-22 04-Apr-22
1662450337 05-Apr-22 07-May-22
1662450337 08-May-22 04-Jun-22
1662450337 05-Jun-22 04-Jul-22
1662450337 05-Jul-22 04-Aug-22
1662450337 05-Aug-22 04-Sep-22
1662450337 05-Sep-22 04-Oct-22
Hi,
Can you please help. i need help with the following
=IF(OR(K20="DE",K20="FR",K20="SE",K20="ES",K20="IE",K20="IT",K20="DK",K20="NL",Z20>150),"GB 320000",K20)
if for example K20= "CH" is not listed in the above formula. is there an add on to this formula to just show K20 as CH
Hope this makes sense.
thanks
Hi!
Add another OR condition as described in the article above.
this is the full formula i'm looking for, but no joy. help would be greatly appreciated
=IF($K20="DE",IF($Z20>150,GB 320000),IF($K20="FR",IF($Z20>150,GB 320000),IF($K20="SE",IF($Z20>150,GB 320000),IF($K20="ES",IF($Z20>150,GB 320000),IF($K20="IE",IF($Z20>150,GB 320000),IF($K20="IT",IF($Z20>150,GB 320000),IF($K20="DK",IF($Z20>150,GB 320000),IF($K20="NL",IF($Z20>150,GB 320000),IF($K20="CH",IF($Z20>0,CH)
I am using the following formula, but I am finding examples where the SUM of T to V = 2 in the first argument and it is still returning a Compliant result when it should be Non Compliant for not being = to 3?
=IF(OR(N46=1,SUM($T46:$V46)=3,N46=0,SUM($T46:$U46)=2),"Compliant","Non Compliant")
Hello!
You are using the logical OR function. If at least one condition is true, the formula returns TRUE.
Simple formula, but I can't figure out how to use IF, or if it is IF OR or IF AND to nest the ifs.
Column A (Salary) has values ranging from 10 to 100.
I want to indicate in Column B whether the numbers in Column A would be, '75 and below,' '50 and below,' and '25 and below.'
I can do the basic =IF(A2<=100,"100 or less","0") but then get stuck trying to add the '75 and below,' '50 and below,' and '25 and below.'
Thanks!
Hi!
Use nested IF function and this example. This should solve your task.
Hi,
Thanks for you great works.
I am working on a file with column A containing dropdown list of numbers 100, 200, and 300. The number represents "account department", "legal department" and "sales department" respectively.
How can I make column B dependent on what is chosen on the dropdown list of column A? That is, if 100 is chosen on the dropdown list in column A, I want column B to return "account department" on its own.
Thank yoy.
Hi!
If you want to check if multiple conditions are true, use a nested IF function.
I would like to calculate a sum of products, but with a pricing break.
1st item= $50, 2nd item onwards = $70 each
Let's say if A buys 3 products, he will have to pay $50 for the first product, for the other 2 items, he will have to pay $70 each.
How could I create a formula for this problem? Hope you could assist me, it'll be a great help
Thank you in advance
Hi!
Use the IF function to calculate the sum for values greater than zero.
The formula below will do the trick for you:
=IF(A1>0,(A1-1)*70+50,0)
I'm trying to use IF to show "ok" or "out of balance" if a value is over or under by more than 5%.
Cell C20 has a value of 700
Cell C21 has a value of 650
My formula for D20 is =C20-C21 giving a value of 50
My formula for D20 is =IF(D20< C20*5%,"Ok","Out of balance")
This works but if the figures in C20 & C21 were reversed the value in D20 is -50 and shows as"Ok"
What I want is the formula to show "out of balance" if the value was over OR under by more than 5%
Hi!
To ignore what is a positive or negative number, use the ABS function -
=ABS(C20-C21)
This should solve your task.
Cell I2="Any Text", J2="Blank Text,K2="Blank Text,L2="Blank Text,
than need answer in Cell M="Any Text"
Blank Text = Blank Cell
one column have any text and other column have no text, I want to type text only automatically
Hi!
You can merge cell values using the CONCATENATE function as described in this article: Combine text strings, cells and columns.
Is there a syntax error with this formula? I'm getting #Name. Likewise with this formula,
=IF(AND(OR(AH2=”glass”,AH2=”stained glass”,AH2=”window”),I2>14,AA2>20),"Y","N")
Hi!
When you copy a formula from a website page, change the slash quotes ” to straight quotes ".
Hi there-
I'm trying to code blood pressure according to JNC 7 criteria for normal/prehypertension/stage 1/stage 2 categories. i have different collumns for "systolic" and "diastolic" blood pressure numbers. A blood pressure can qualify for prehypertension, for example, if the systolic OR the diastolic numbers qualify. Here is what I have - can you help me figure out why it's not working?
=IF(OR(G10 > 159,H10 > 99),"2",IF(OR(G10 > 139,H10 > 89),"1",IF(OR(G10 > 119,H10 > 79)"PRE",IF(G10 < 120,"NORM"))))
Hi!
I can't see your data and therefore can't tell what doesn't work in the IF function with multiple conditions. But a comma was missing in the formula.
=IF(OR(G10 > 159,H10 > 99),"2",IF(OR(G10 > 139,H10 > 89),"1",IF(OR(G10 > 119,H10 > 79),"PRE",IF(G10 < 120,"NORM"))))
Maybe that will help.
Trying to combine these two IF statements into one IF OR statement:
=IF(F:F<TODAY(),"Past Due", "Future Ship")
=IF(G:G=H:H, "Picked" , "N/A")
Any help would be appreciated!
Hi1
What you want to do is not possible. These formulas use different values and are not connected in any way.Please re-check the article above.
What is the best way to combine the two following statements. Combing is where I seem to have problems.
=IF(AND(K2="Urgent"),IF(N21,"Fail")))
=IF(AND(K2="Not Urgent"),IF(N23, "Fail")))
Thank you
Hi!
Based on your description, it is hard to completely understand your task. IF(N21,”Fail”) - doesn't make sense. However, I’ll try to guess and offer you the following formula:
=IF(AND(K2="Urgent",N21="Fail"),TRUE,IF(AND(K2="Urgent",N21="Fail"),))
I recommend reading this guide: IF AND in Excel. Nested formula, multiple statements, and more.
i have customers data in excel how create customer wise statement a period of year or month
Hi!
The information you provided is not enough to understand your case and give you any advice. However, I can assume that you can select data about the customer using the FILTER function. The following tutorial should help: Excel FILTER function - dynamic filtering with formulas.
Hello there!
I could not get this formula to work. Could you help me identify where could be the error? It always gives a #VALUE! result.
=IF(OR(B:B={"Third Party & Terminal PIU Unit","Shaybah Projects Inspection Unit","Dist & Refined Product P/L PIU Unit","RT Refinery & Juaymah NGL Unit","RTR Clean Fuel Complex Unit","Riyadh Refinery Unit","Cross Country Pipeline PIU Unit","Master Gas System Proj Inspection Unit","Pipeline Upgrade & Crude Delivery Unit","WR Refining & NGL Projs Insp Unit","WR Pipelines & Terminal Unit","WR Bulk Plant & Dist Unit","Jazan Complex Projs Inspection Unit"}), "DPID", ""), IF(OR(B:B={"Maritime Yard Dev Project Inspection Sec","Ship Building Projects Inspection Unit","Off, Rigs Platform & Utls Proj Insp Unit","Maint & Support Vessels Proj Insp Unit","Special Kingdom Projects Inspection Unit","Community Projects Inspection Unit","Communication & Security Unit","Batch Plants & Civil Testing Unit"}), "MBIPID", ""), IF(OR(B:B={"Gas Compression Projs Inspection Sec","NA Gas Facilities","SA Gas Facilities","Fadhili Project Insp Unit","Hawiyah Increment Projs Inspn Unit","Haw/Una Gas Reservoir Storage PIU","North Gas Comp Plants Proj Insp Unit","Haradh&Hawiyah Comp P/L Proj Insp Unit","Satellite Gas Comp Plants Proj Insp Unit","South Gas Comp Plants Proj Insp Unit","Infrastructure & Support Proj Insp Unit","Jafurah Util, Sulfur & Intrcon Sys PIU","Jafurah Gas Processing Trains PIU","Jafurah Pipelines, IT & Site Dev PIU","Jafurah Infra & 3rd Party Coord PIU","Wasit-Jafurah NGL Fractionation PIU","Jafurah Pipelines, & Downstream Fac PIU","NGL Recovery & Fract' Unit","Utilities, Flare & Piperack Unit","Site Prep, ISF, SSF Unit","Inlet Storage & Compression Unit","Downstream Pipeline Unit","Gas Treat, Sulfur Rec' & Han' Fac Unit","Unconventional Resources Projs Insp Unit"}), "UGIPID", ""), IF(OR(B:B={"SA Oil MP Projs Inspection Unit","NA Oil MP Projs Inspection Unit","Gas MP Projs Inspection Unit","Marjan Offshore Gas Facilities Unit","Marjan GOSP-4 Unit","Marjan Offshore Oil Facilities Unit","Marjan Onshore Oil Facilities Unit","Zuluf Onshore Facilities Proj Insp Unit","Zuluf Offshore Facilities Proj Insp Unit","Infras, Pipeline & Comm Proj Insp Unit","North Ghawar Oil Facilities Unit","NA Oil Facilities","South Ghawar Oil Facilities Unit","Berri Increment Processing Fac Unit","Berri Onshore Facilities Unit","Fabyards ProJ Insp Unit","Installation Projects Insp Unit","Onshore Proj Insp Unit"}), "UOPID", "")
Many thanks.
Hi!
Your formula is so big that it is impossible to understand it. It's not clear what you want to do. However, keep in mind that such a formula always returns an array of values.
=IF(A1:A10={"a","b","c"},TRUE)
See the result of this formula.
“Gopal informed other students if you score 20 marks in end term exam OR 60 marks in total in
subject then you PASS otherwise FAIL.” write an excel command.
I need help,
I have this scenario where Agent 1 has a ceiling of 500, Agent 2 has 250 and Agent 3 has 150.
If at anytime any of the agents pay goes above the ceiling, then 10% is calculated on the ceiling if the pay is below the ceiling then the 10% is calculated on that amount
How do i use IF statement to achieve this in Excel
Hello!
I recommend reading this guide: Nested IF in Excel – formula with multiple conditions.
If I understand your task correctly, the following formula should work for you:
=IF(A1="Agent 1",IF(B1>500,500*10%,B1*10%),IF(A1="Agent 2",IF(B1>250,250*10%,B1*10%),IF(A1="Agent 3",IF(B1>150,150*10%,B1*10%))))
This works. Thank you
Hello,
Is there a way to combine two formulas below:
=IF(B63=TRUE; (G63)-(F63*1,21*D63); 0)
=IF(B63=TRUE; (G63)-(F63*1,21*D63); 0)
Tried this way, but it's not working:
=IF(B63=TRUE; (G63)-(F63*1,21*D63); 0); OR(=IF(B63=TRUE; (G63)-(F63*1,21*D63); 0))
Thank You for Your time!
Sorry, mistake! I meant:
=IF(B63=TRUE; (G63)-(F63*1,21*D63); 0)
=IF(H63="Paid"; (G63)-(F63*1,21*D63); 0
Tried this way, but it's not working:
=IF(B63=TRUE; (G63)-(F63*1,21*D63); 0); OR(=IF(H63="Paid"; (G63)-(F63*1,21*D63); 0))
Hi!
I think you have not read the article very carefully. There is an answer to your question.
=IF(OR(B63=TRUE;H63=”Paid”);(G63)-(F63*1,21*D63); 0)
I really appreciate Your answer! Thank You!
How To Extract Unique Values or Duplicate Names and sort (A-Z) Based On Criteria In Excel? Using index or match.
For Example:-
Sl No# Location Name score
1 Mumbai Rohit 93
2 Mumbai Sachin 93
3 Gujrat Suresh Raina 90
4 Ranchi M.S Dhoni 85
5 Ranchi Sorabh Tiwari 85
Hello!
How to extract unique values using INDEX + MATCH functions, read this tutorial.
Your examples helped me find a solution - thanks for posting this page.
Please check to see if the following is an error in the section "IF OR statement in Excel" where you state the lines below [in brackets like those enclosing this phrase to avoid confusion if I used double quotes]:
[ Here's is an example of the IF OR formula in the simplest form:
=IF(OR(B2="delivered", B2="paid"), "Closed", "Open")
What the formula says is this: If cell B2 contains "delivered" or "cancelled", mark the order as "Closed", otherwise "Open". ]
However, as I read the formula, it indicates that if cell B2 contains "delivered" or "paid" (not "cancelled") then the order will be marked as "Closed". If you look at the screen shot, the row containing "Cancelled" shows a Status of "Open", not "Closed" as your explanation states it will. Please clarify for your readers.
Hello!
Of course, it is "paid", not "cancelled". Thank you for pointing that out, fixed!
I am trying to say that if One Cell = this amount add / subtract a Certain amount.
Can this be done??
EX: =IF(D6/7=E6,G6) OR (D6/7=E6,H6) OR (D6/7=E6,I6) OR (D6/7=E6,J6) OR (D6/7=E6,K6)
Thx...Dawn
Hi!
Sorry, I cannot understand your formula
=IF(AND(A2="VISHAL", B2="HP", C2=610), "6", "10"), IF(AND(A2="VISHAL", B2="HP", C2=2310), "15", "20")
WILL THIS WORK?????????
I NEED TO ENTER MULTIPLE RESULT IN A SINGLE CELL, FROM DIFFERENT CONDITIONS.
Hello!
Your conditions contradict each other. For example, if A2 = ”VISHAL”, B2 = ”HP”, C2 = 900 then the first condition will return 10, and the second - 20.
This isn't working. What am I doing incorrectly?
=IF((OR(E2=Daily, E2=Weekly)), Next Shift, ENTER DATE)
Column E indicates if a project is due daily or weekly. Column F would ideally calculate today+1 for daily or today+8 days for weekly.
Hi,
You must enclose text values in quotation marks, such as "Weekly".
What is "Next Shift, ENTER DATE"?
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(E2="Daily",TODAY()+1,IF(E2="Weekly",TODAY()+8,""))
Hope this is what you need.
I got it! thank you. :)
Hi.. need help.
i have date today and start date, to calculate the case age but another column is the status of the case, close or open.. so the logic will be.. calculate the case age if the case is still open..
thank you in advance.
Hello!
In the condition of the IF function, write down the check that the case is open. If the condition is met, calculate the age using the DATEDIF function.
Hope you’ll find this information helpful.
I got this formula: =IF(OR(C2="Closed","--"),(SUM(A2-B2)))
but..
it's working but the other way around. it calculates the age if the case is marked as "Closed".
Hi, I would like to know a formula to show if something if greater than or less than a number to show a figure for example
11 years service - if the years service is more than 10 to show 2, if it is less than 10 but more than 5 to show 1 and if it is less than 5 to show 0.
hope this makes sense.
TIA
Hello!
I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
=IF(A1>10,2,IF(A1>5,1,0))
there are some proble with me in excell example
=if(a1<10,100,"enough",if(d1=0,"niu"))
Please I need your help how can I come up with the formula for this
45000 =0%
5000=15%
Next 2950000=30%
Excess 3000000=35%
Hello!
A similar question has already been asked many times on our blog. I think this answer will be helpful.
I need some help in constructing the formula to this:
I need to derive a result(column title) if ALW(column title) is 1.56 and up its Oversize, if ALW is 1.20-1.55 its Goodsize, if ALW is 1.10-1.19 its Undersize, if ALW is 1.0-1.09 its Offsize, and if ALW is below 1.0 its Runts
Hello!
I’m sorry but your task is not entirely clear to me.
What is the column title? In Excel and other spreadsheet applications, the column header is the colored row of letters used to identify each columnwithin the sheet, or workbook. Column title is a letter.
If your question is about an Excel cell -
=IF(A1>=1.56,"Oversize", IF(A1>=1.2,"Goodsize", IF(A1>=1.1,"Undersize", IF(A1>=1,"Offsize", "Runts" ))))
i need a formula like ( date of joinin - current date less than 365 days then the answer should be 0
Hello!
How to use Excel IF function with dates read in this article.
Hi,
I am trying to do the following if statements with the last if statement to add on an additional 1 week if P13 = "U" but I can't get this to work. Any help would be welcomed.
=IF(AND(O131,O133,O135),4,IF(AND(P13="U",2),TRUE)))))
Hello Joanne!
I’m sorry but your task is not entirely clear to me.
Please describe your problem in more detail. Include an example of the source data and the result you want to get. It’ll help me understand your request better and find a solution for you. Thank you.