For powerful data analysis, you may often need to build an Excel IF statement with multiple conditions or use IF together with other functions. This tutorial will show you the most effective ways to do this. Continue reading
by Svetlana Cheusheva, updated on
For powerful data analysis, you may often need to build an Excel IF statement with multiple conditions or use IF together with other functions. This tutorial will show you the most effective ways to do this. Continue reading
Comments page 10. Total comments: 2538
If 3 out of any 6 cells of a ROW have a value greater than 0, then how to find it In google sheet.
Hello Vijay,
You can color such cells using conditional formatting.
Sir when I use the if condition in this type of example in many time but we can't find the actual right answer for this condition.so how were we do.
Example: =IF(B2= "MAHARASHTRA"),(A2*4%),(A2*12.5%))
Hello!
Please try the following formula:
=IF(B2= "MAHARASHTRA",A2*4%,A2*12.5%)
Hi I was hoping you could help. I have Today() in cell A1, date in B3, and a formula in cell C3: =$A$1-B3.
I want to make cell C3 to be BLANK if cell B3 date is blank with no date.
I want to make cell D3 to be "YES" if C3>14 and "NO" if less. However, if cell C3 is blank, D3 also should be blank
Have tried in cell C3 =IF(ISBLANK(B3), "", $A$1-B8) and in cell D3 =IF(C3>14, "YES","NO").
The cell C3 does return blank however, cell D3 does not, the problem is Today() in cell A1 is returning a value which mean the cell is not empty. I checked by using =IF(ISBLANK(K8), "TRUE", "FALSE"), the answer is False.
Please kindly help
Hello!
The formula below will do the trick for you:
C3 ---
=IF(ISBLANK(B3),"",A1-B3)
D3 ---
=IF(ISBLANK(B3),"",IF(A1-B3 > 14,"Yes","No"))
Hope this is what you need.
Hi there hoping someone can help me im trying put in a formula that looks at the 2 columns before and depending if a=x b=y then = z
so as an example ive changed the words to colours(as its for work so privacy rules)
=IF(($H$2=Red), AND($I$2=Yellow), THEN($J$2="Orange"))
Red and yellow = orange
but Red and blue = brown
Please help! :)
Hello!
I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
=IF(AND(H2="red",I2="yellow"),"orange","")
HI,
I am trying to write a formula with 2 conditions to meet a value and if not return a different value.
I am asking to look up if cell = UK Mainland and if 2nd cell is = Supply and Install return a value of "55", if not return a value "33 or 50 check origin". The formula is not working see below:
=IF(and(H12="Mainland UK",L12="Supply & Install", "55", "33 or 50 check origin"))
I am getting error:
Not trying to type a formula?
When the first character is an equal (=) or minus (-) sign, excel thinks it's a formula:
you type = 1+1, cell shows: 2
to get around this, type an apostrophe ( ' ) first:
you type '=1+1, cell shows : 1+1
I have tried this and its not working, does anyone have a solution please.
Thanks
Paul
Hello!
Please try the following formula:
=IF(AND(H12="Mainland UK",L12="Supply & Install"), "55", "33 or 50 check origin")
I hope it’ll be helpful.
Thanks Alexander. I tried that and it didn't work for me, getting the same error message as per my original post.
Any other ideas on how to return the formula using the apostrophe function?
Thanks Paul
Hello!
This formula works for me. Please describe the error in detail.
Hi Alexander,
Its working now, thanks. There was an issue with excel spreadsheet. I closed it and re did the formula and it works.
Thanks You.
#need help
I would like to request the help of (if function)
Annual leave: if the join date over equal 36 months will get 1 if the join date over equal 72 months will get 2, if the join date over or equal 108 months will get 3,
so what're formulas that can show anwser:
Join date: 01/January/2018 : 38months will get 1
01/January/2015 :74months will get 2
01/January/2012 :74months will get 3
Hello!
If I got you right, the formula below will help you with your task:
=INT(DATEDIF(B1,TODAY(),"m")/36)
You can learn more about DATEDIF function in Excel in this article on our blog.
Hi
How can we use if, and or or for date which is between start date and end date
I.e. 1/6/2002 is 18 year
Start date 1/1/2002
End date 31/1/2002
And so on for 17 years / 16 years etc...
Hello!
Please have a look at this article — Excel IF formula examples for dates.
Hope you’ll find this information helpful.
If this is not what you wanted, please describe the problem in more detail.
I have a spreadsheet with 12 columns. I'd like to write a formula that will change column I to "yes" when the value in column F falls below the number in it. How do I write that please?
Hi,
If a number is written in column I, you cannot change it to "Yes" using an Excel formula. For this you need to use VBA.
Can anyone please help me get this formula right. My conditions are, If A2 value (Percentage value) is lower or higher than B2 value (Percentage value) by 2-5% then C2 should say False.
Hello!
Please use the formula below:
=IF(AND(ABS(B2-A2) > 0.02,ABS(B2-A2) < 0.05),FALSE,"")
Thank you, it worked for me
If A2 value = B2 value or if A2 and B2 value difference is just +/-1% then C2 should say Pass
Have three columns and conditional formatting applied across all rows. Conditions for column 1 are >0 is green, between 0 and -20 is yellow, and <-20 is red, similar conditions for columns 2 and 3.
I'm trying to create a conditional formatting formula that will look at all three instances in a row and if I have a combination of colors for the three columns, output an overall color. 3 greens = green, 3 reds = red, 3 yellows = yellow, 2 greens and a yellow = no formatting, 2 yellows and a red = orange.
I've tried several different formulas using if(AND( statements, but given greater than two variables, but not always coming out accurate. Any help is appreciated.
Hello!
Please check out the following article on our blog, it’ll be sure to help you with your task: Excel conditional formatting Data Bars.
I hope my advice will help you solve your task.
Can anyone solve this issue to use the below three different arguments in one cell?
=IF(OR(D8="1450Friday",D8="1450Saturday"), 6.14, 5.12)
=IF(OR(D8="1000Friday",D8="1000Saturday"), 6.14, 5.12)
=IF(OR(D8="900Friday",D8="900Saturday"), 6.14, 5.12)
Thanks
Hi,
If you wanted to combine all conditions in one formula, then try this:
=IF(OR(OR(D8="1450Friday",D8="1450Saturday"), OR(D8="1000Friday",D8="1000Saturday"), OR(D8="900Friday",D8="900Saturday")), 6.14, 5.12)
Hope this is what you need.
I have a spreadsheet which has a list of employee numbers and required proficiencies along the top. I have a formula which puts a Y if the person has that proficiency (based off a data sheet). But I would like to make a formula which tells me if someone is qualified based off their proficiencies held . For example one of the variables:
If employee has a Y under prof 1, prof 2, prof 3 ect (through to prof 12) and they also hold prof 13 or 14, and hold prof 15 or 16 or 17, and hold prof 18 or 19 or 20, and hold prof 21 or 22 or 23 then they are marked as yes otherwise they are marked as no
I am using Excel 16 so I can't use IFS formulas
Further to my last comment, what would be the most efficient formula for marking "Y" if they have the proficiency. I currently use:
=IF(ISERROR(VLOOKUP($A6&J$5,PROFRPT,1,0)),"","Y")
On the reporting tab in column A I have the formula =B2&L2 and the name manager PROFRPT:
='Proficiency Report'!$A$2:INDEX('Proficiency Report'!$A:$A, COUNTA('Proficiency Report'!$A:$A))
Although I get really large lag with calculating. To the point where sometimes I can even save and exit the workbook for hours because it's caculating
I have a number that i want to find if it is available in a table of ranges then give me range index of the number
ex:
if i have a number 76 i want a formula to check number 76 in the below table and brings me the index =2
if i have a number 211 i want a formula to check number 211 in the below table and brings me the index =4
table of ranges
1 1 to 69
2 70 to 138
3 139 to 207
4 208 to 276
5 2277 to 345
Hello!
Please use the following formula:
=INDEX(A1:A5,MATCH(E1,B1:B5,1))
E1 -- 76 or 211
You can learn more about INDEX and MATCH functions in Excel in this article on our blog.
Hi,
Thank for such a great post!! and quick response for other!!
Can you please help me!!
My Logics are: 0+0=A, 0+1=B, 1+0=C, 1+1=D.
I Tried with this, =IF(AND(I2="",J2=""),"A",IF(AND(I2="",J2=""),"B",IF(AND(I2="",J2=""),"C","D")))
But this shows only A or D !!
Thanks in advance.
**Please ignore my previous post.
Hello!
If I got you right, the formula below will help you with your task:
=IF(AND(I2="",J2=""),"A",IF(AND(I2="",J2 < > ""),"B",IF(AND(I2 < > "",J2=""),"C","D")))
I hope it’ll be helpful.
Hello all,
I have the current formula
=IF(AND(I32>=$O$32,ABS(J32)= 1 hour and cell J32 <=.125 inches than I get a passing result. I am trying to add another condition onto this formula in that if cell J32<= .002 at any time I would also get a passing result. Any help would be greatly appreciated
Hello!
If I got you right:
=IF(AND(I32>=$O$32,ABS(J32)= 1,J32 < = 0.125,J32 < = 0.002),TRUE,FALSE)
I don’t think this formula will work as the conditions ABS(J32)= 1,J32 < = 0.125,J32 < = 0.002 contradict each other. They cannot be executed at the same time.
Cheers! I did have the incorrect formula written in my first comment. The correct formula is:
=IF(AND(I32>=$O$32,ABS(J32)<=0.125),"Pass", "Fail")
From here I was looking to add another condition onto this formula in that if cell J32<= .002 at any time I would also get a passing result. Apologies for the typo in the first question. I will see if I can implement your reply but more help in the matter would be fantastic.
Hi,
Please try the following formula:
=IF(OR( J32<= 0.002,AND(I32>=$O$32,ABS(J32)<=0.125)),"Pass", "Fail")
Hope this is what you need.
Hello everyone,
Could you please check my formula?
=IF(F2>=5000 & G2>=10%,"5%",IF(F2>=5000 & G2<10%,"3%",IF(F2<5000 & G2<10%,"10%",IF(F2=10%,"4%"))))
So what I am trying to do is basically puting 2 conditions for 1 result. I will call the ensemble of these 2 conditions "Super condition", which in this case are 4 "super conditions".
After including the formula, it gives me only one result, which is 5% no matter how much I change the values in the super condition.
Can any one support regarding this matter, it would be most helpful!
With my best regards,
Hello!
Your formula has the wrong AND condition. See Example 1 above.
=IF(AND(F2>=5000, G2>=10%),"5%",IF(AND(F2>=5000,G2<10%),"3%",IF(AND(F2<5000,G2<10%),"10%",IF(F2=10%,"4%",""))))
You are a Godsend, thank you very much!
I created the following formula based on the tutorial above. While the formula appears to work, I am unable to sum the results. I wasn't able to fix this by changing the formatting - it's already set to numbers. Any idea why this isn't working?
=IF(A1>=30, "1.0", IF(A1>=10, ".5", IF(A1= 10-29, result should be .5
A1>= 30, result should be 1.0
Once I get the result, I then need to be able to sum the column for all values.
Hello!
To perform calculations on the results of your formula, it must return a number, not text.
=IF(A1 > = 30, 1, IF(A1 > = 10, 0.5, IF(A1<10, 0)))
I hope it’ll be helpful.
I created the following formula based on the tutorial above. While the formula appears to work, I am unable to sum the results. I wasn't able to fix this by changing the formatting - it's already set to numbers. Any idea why this isn't working?
=IF(A1>=30, "1.0", IF(A1>=10, ".5", IF(A1<10, "0")))
A1= 30, result should be 1.0
Once I get the result, I then need to be able to sum the column for all values.
I tried to submit this once already, but when it posted the details jumbled together - trying again.
=IF(E2>=70, "Excellent", IF(E2>=60, "Good", IF(E2>40, "Satisfactory", "Poor ")))
This formula doesn't work as is stated. How to make it work if you have logic text and column true and false. For example:
Logic: E2>=70
True: "Excellent"
False: "Poor"
How to insert other variables to work?
Hi,
The formula you wrote works. But if I understood correctly, a different formula is needed for your conditions.
=IF(E2 >= 70,"Excellent","Poor ")
Hope this is what you need.
Trying to do the following:
If text in A1:A30 = "Apples" then take number in B1:B30 and divide by 2. below is what i am trying to make it look like. Probably pretty easy for some but i am a rookie
column A Column B Column C
Apples 5000 2500
Hi,
Please use the following formula:
IF(A1="Apples",B1/2,"")
After that you can copy this formula down along the column.
I have situation in which. If Requirement is greater than a Packaging standard then it should return value as per PAckaging standard. Ex - if requirement is 19 Kg and Packaging standard is of 6Kg then return value should be 24 KG.
Another Example - If Requirement is of 17 Kg & Packaging standard is of 4 KG then return value should be 20 KG.
Plz help me to apply this formula
Hello!
Use the CEILING function as described in this manual.
I hope it’ll be helpful.
Can i do a formula for this?
Tally all the dollar amount in column O lines 2 through 50
But Only if there is a Y (for yes) in column V on each line
If there is a N (for no) in column V its not included in the grand total
Hello!
Here is the article that may be helpful to you: COUNTIF function in Excel - syntax and usage.
I hope this will help, otherwise please do not hesitate to contact me anytime.
Thank you for the link. I still cant figure it out. Those all seem to just give me a tally of numbers. I need a sum of the amounts. So in Column O i have 50 lines of salaries. In Column V i have 50 lines of either Y or N ( for yes or no). I want to be able to get the dollar amount total in Column O only if there is a Y in column V. The COUNTIF formula was only giving me the number of Y's i had in column V.
That way i can see the grand total dollar amount update if i change the Y to an N or vice versa.
Hello!
If you need a sum, use the SUMIF function.
=SUMIF(V1:V50,"Y",O1:O50)
I hope I answered your question.
THANK YOU!
Good day
The second cell as my reference cell to my third cell has already formula, the formula is =IFERROR(C14/$C$13,0)*100 and displays nothing. The formula of the third cell is =IF(OR(D14=""),"",IF(D14>83.99,"O",IF(D14>75.99,"VS",IF(D14>67.99,"S",IF(D14>59.99,"FS",IF(D14<=59.99,"DNME","")))))) , but still the DNME will display. I want it to display nothing if the cell has no entry
Please help me.. Thank you
Hello!
I assume that you have some non-printable character written in cell D14. Copy the formula onto a new blank worksheet and test it there.
What if i have 2 worksheets ( A and B). Worksheet A has a lot of data with various columns but in column A there are unique codes. Worksheet B has a few items all taken from worksheet A. Worksheet B also has the unique codes in column A (the same codes as worksheet A). i want to do a statement where it shows the following: if the unique code in worksheet B is he same as worksheet A and if column O in worksheet A has a date in it on the same row as the specified unique code then say YES in column H on worksheet B, if it does not have a date in it then say NO.
Hello!
If I understand your task correctly, the following formula should work for you:
=IF(IFERROR(DAY(CELL("contents",INDEX(Sheet1!$O$1:$O$30,MATCH(A1,Sheet1!$A$1:$A$30,0)))),0)>0,"Yes","No")
I hope this will help, otherwise please do not hesitate to contact me anytime.
I am trying to write an excel formula which can be dragged across a row of cells to give the number of days in each month between two specified dates.
A B C D E F
1 | START DATE | END DATE | Jan | Feb | Mar | Apr ...etc |Location
---------------------------------------------------------
2 | 01/26/20 | 10/30/20 | 0 | 19 | 15 | 0 |Mexico
3 | 07/15/20 | 12/03/20 | 0 | 19 | 15 | 0 |United States
Also, i have location specific holiday list to be excluded in this calculation. Now i am using the below formula to drive the days. But i can't change the holiday list based on Location column. I am expecting the holiday list to be chosen based on the value in the location column.
=MAX(0,NETWORKDAYS(MAX(D$5,$B6),MIN(DATE(YEAR(D$5),MONTH(D$5)+1,0),$C6),$T$1:$T$20))
Holiday List seems to be as below.
United States Mexico
1/1/2021 7/5/2021
2/15/2021 9/6/2021
5/31/2021 11/11/2021
Hello!
You can use IF function:
=IF(F5="Mexico",MAX(0,NETWORKDAYS(MAX(D$5,$B6),MIN(DATE(YEAR(D$5),MONTH(D$5)+1,0),$C6),$T$1:$T$20)),MAX(0,NETWORKDAYS(MAX(D$5,$B6),MIN(DATE(YEAR(D$5),MONTH(D$5)+1,0),$C6),$S$1:$S$20)))
I hope this will help, otherwise please do not hesitate to contact me anytime.
@Alex, thanks for your response. this is really helps. But In my case, i have a holiday list for nearly 20 regions. It's quite complicate to write if condition. Is there alternatives to perform this action?
Hello!
You can use a named range in your formula.
Create from $T$1:$T$20 named range "Mexico". Create from $S$1:$S$20 named range "United States".
Please try the following formula:
=MAX(0,NETWORKDAYS(MAX(D$5,$B6),MIN(DATE(YEAR(D$5),MONTH(D$5)+1,0),$C6),INDIRECT(F5)))
If F5 contains "Mexico", then the formula INDIRECT(F5) will substitute the range $T$1:$T$20.
I hope I answered your question. If something is still unclear, please feel free to ask.
I have a list on a tab called data which has the following:
Employee ID in cell A2, A3 ect
Start date in cell B2, B3 ect
End date in cell C2, C3 ect
Leave code in cell D2, D3 ect
Then I have a monthly calander on a tab called calander which has the following:
Employee ID in cell A3, A4 ect
The date in cell E2, F2 ect (i.e 1 Feb, 2 Feb)
I want to insert a formal into the calander tab in say cell E3 which does the following: if the members employee number in A3 appears anywhere on the list on the data tab and the date in E2 falls between the dates on the date tab it returns the leave type for that date range. If that employee doesnt have a leave type in for that date then I want it to return a blank value
Any help would be appreciated
Thanks Lauren
Hello!
If I got you right, the array formula below will help you with your task:
=IFERROR(INDEX(Sheet2!$D$2:$D$10, MATCH(1, (calander!A3=Sheet2!A2:A10) * (calander!E2>=Sheet2!B2:B10) * (calander!E2<=Sheet2!C2:C10), 0)),"")
This is an array formula and it needs to be entered via Ctrl + Shift + Enter, not just Enter.
Here is the article that may be helpful to you: Excel VLOOKUP with multiple conditions
Hope you’ll find this information helpful.
Thank you so much this solved my issue, I just had to make a few changes (see below) but this has caused an extra problem for me. Because I used $B:$B etc (because my list on the data tab is indefinite i.e. could have 1000 entries or could have more). I now have a really long calculation time. Is there a way to tell the formula to look at any data in those columns without using $B:$B etc?
=IFERROR(INDEX(Data!$B:$B, MATCH(1, (Calander!$A3=Data!$A:$A) * (Calander!E$2>=Data!$C:$C) * (Calander!E$2<=Data!$D:$D), 0)),"")
Hello!
Do not use an entire column reference in an array formula. This slows down computation very much. Use dynamic named range or Excel table.
Here is the article that may be helpful to you: How to create and use dynamic named range in Excel.
Please have a look at this article: Excel table - end-to-end tutorial with examples
I hope this will help, otherwise please do not hesitate to contact me anytime.
Once again you have solved my issue, thank you so much
Please Help I want formula for following - If cell Value of A1 is lesser than or equal 1300 then multiply by 14 if great than 1300 then first 1300 is multiply by 14 and remaining value is multiply by 11
(result shows in A2)
Ex:- if A1 value is 1200 then in A2 cell result is 1200*14
if A1 Value is 1310 then in A2 cell result is 1300*14 & 10*11 = Total should be 18310 (18200+110=18310)
Hello!
I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
=IF(A1<=1300,A1*14,(A1-1300)*11+1300*14)
Hi!
I have cells I want to fill through conditional formatting depending on the following:
1. If the schedule is MWF or TTS (found in column AH)
2. The day of the week (found in row 2)
I will have 2 formulas for conditional formatting: one for MWF, and the other for TTS.
The cells that need filling are in C3 through AG30 (for a 31-day month).
I tried using the formula (absolute reference excluded): =IF(AND(AH3="MWF",OR(C2="Mon",C2="Wed",C2="Fri"))), but it doesn't seem to work.
Is there a way to use one formula for both MWF and TTS conditions?
What can you advise? Thank you very much!
P.S.
If the cell is filled with some values, they should change colors, but I already have a separate conditional formatting formula for this.
Hi,
If I understand your task correctly, the following formula should work for you:
=(AND($AH3="MWF",OR(C$2="Mon",C$2="Wed",C$2="Fri")))
Please check out the following article on our blog, it’ll be sure to help you with your task: Relative and absolute cell references in Excel conditional formatting rules
I hope I answered your question.
Hi!
Thank you for the prompt response. This works great!
At the moment, I have 2 separate entries in the conditional formatting for MWF and TTS. Is there a way to combine both?
Also, it works only if the entry in C$2 (and the rest of the cells in row 2) is actually "Mon", "Wed", or "Fri". if cell C2 has the formula =B$2+1 (and the rest of the cells in row 2 have a similar recursive formula), it does not work. The entries in this row are custom-formatted as "ddd" (to return 3-character days, i.e. Mon, Tue, Wed, etc.
The formula in B2 is = A1, with A1 the first day of the month with the format mm/dd/yyyy.
My current workaround is manually setting C2 to I2 as Mon, Tue, Wed, etc. with J2=C2, K2=D2 up to AG2=Z2, but I would like to automate this step as well so that the entire sheet is good to go when I change the entry in A1.
I will need to research this further, but any help would be much appreciated.
Thanks again!
Hi,
The formula I sent to you was created based on the description you provided in your first request. However, as far as I can see from your second comment, your task is now different from the original one.
Add to the OR formula the days of the week that you want. You have a sample.
=IF(AND(OR(AH3="MWF",AH3="TTS"),OR(C2="Mon",C2="Wed",C2="Fri", C2=....,C2=....)))
Thank you very much for the suggestion. I will try it as soon as I can.
Have a wonderful day!
I am looking for the correct If statement:
If C112%, 0%
If C1>6% and <12%, C1/12%
So the answer should return 100%,0%, or divide the %/12%
Sorry your formula is wrong
If between AH5 cell is 0% TO 5% Results will be 0%
If between AH5 cell 5% TO 6% Results will be 3%
If between AH5 cell 6% TO 8% Results will be 5%
If More than AH5 cell 8% percent Results will be 8%
Please help me on this earliest
CAN YOU PLEASE HELP ON THIS SIR
6% >= Breach > 5% 3% of breached orders
8% >= Breach > 6% 5% of breached orders
Breach > 8% 8% of breached orders
I need formula
6% >= Breach > 5% 3% of breached orders
8% >= Breach > 6% 5% of breached orders
Breach > 8% 8% of breached orders
I need in between formula
I am trying to create a formula that allows a name (that is typed in cell A) to input when a value (that is typed in cell C) =<192
Hello!
If I understand your task correctly, the following formula should work for you:
=IF(C1<=192,A1,"")
I hope it’ll be helpful.
I have a sheet with 2 tabs. in the first sheet i have 4 different scores. 1, 0,5, 0 and blank. In the next tab I need a formula that return 1 and blank as 0 and the o and 0,5 as 1.
How do I do the formula
Hello!
Please use the following formula
=IF(OR(A1=1,A1=""),0,IF(A1=0.5,1,""))
or
=IFS(A1=1,0,A1="",0,A1=0.5,1)
I hope it’ll be helpful.
If the decimal number is lower than .5 then round down
If the decimal number is higher than .5 then round UP
if the decimal number is equal to 0.5 & if the number is odd then ROUND the int number to same odd number only
If the decimal number is equal to 0.5 & if the number is even ,then round UP the int number to nearest odd number
Hello!
If I understand your task correctly, the following formula should work for you:
=IF((A2-INT(A2))=0.5, IF(MOD(INT(A2),2)=1, INT(A2), ROUND(A2,0)), ROUND(A2,0))
Okay I got the answer No need to reply!
Thanks
Hello
I'm trying to combine a IF and SEARCH function in a formula where if it finds in S1 "WSPD" If true "WSPD" if false Search in S1 "WSTM" if True "WSTM" , if false Search "WSAC" in S1 if true "WSAC" if False Search in S1 for "WSAD" if true "WSAD" .... If any of does not contain WSPD or WSTM or WSAC or WSAD.... then "WSSC"
I've put this formula
=IF(SEARCH("WSPD",S4),"WSPD",IF(SEARCH("WSTM",S4),"WSTM",IF(SEARCH("WSAC",S4),"WSAC",IF(SEARCH("WSAD",S4),"WSAD",""))))
It work to detect WSPD, but doesn't work for all other condition it just puts #VALUE
Thanks for your help to find where I did wrong
Hello!
Please use the following formula
=IF(ISNUMBER(SEARCH("WSPD",S4)),"WSPD", IF(ISNUMBER(SEARCH("WSTM",S4)),"WSTM", IF(ISNUMBER(SEARCH("WSAC",S4)),"WSAC", IF(ISNUMBER(SEARCH("WSAD",S4)),"WSAD",""))))
Hope this is what you need.
Yes it worked perfectly fine many thanks
Is there a way to include multiple AND statements in the IF formula? I am trying to populate response in Col A based on amounts in Col B and Col C.
- If Col B and Col C are both less than 0, then response 'Loss'
- If Col B and Col C are both greater than 0, then response 'Income'
- If Col B less than 0 and Col C greater than 0, then response 'Loss / Income'
- If Col B greater than 0 and Col C less than 0, then response 'Income / Loss'
Currently excel is allowing only two conditions. When I add the third it says "You have entered too many arguments for this function".
This works =IF(AND(B1<0,C10,C1>0),"Income"))
This gives error message =IF(AND(B1<0,C10,C1>0),"Income"),IF(AND(B10),"Loss / Income"),IF(AND(B1>0,C1<0),"Income / Loss"))
Thanks!
Hello!
The formula below will do the trick for you:
=IF(AND(B1 > 0,C1 > 0),"Income",IF(AND(B1 < 0,C1 > 0),"Loss / Income",IF(AND(B1 > 0,C1 < 0),"Income / Loss","")))
Hope this is what you need.
I am wondering if the formula has to include the absolute value, or if it can be a range. For example: I am trying to use the formula if the value is between 5.8-6.1 it will read as "Good". Is this possible to achieve, or can it only ever be = to one absolute value? This is the formula I have tried to do this: =If(C:C>=6.2,"Excellent",if(C:C=5.8-6.1,"Good",if(C:C=5.1-5.7,"Fair","Poor")
Hello!
If you use a range in the IF function, then its result will also be a range (array) of values. You must have a lot of free space on the sheet to display this array. If there is not enough space, you will get a #SPILL error.
Expression C:C = 5.1-5.7 is incorrect. Read about using multiple conditions in an IF function in this article.
Lets say
I have 1.0 -5.0 then I wan between 50 - 0 so the value of 1.0 is 50 then if it 1.1 that's 49 how would I convrt 2.8 into its specific range
Hi,
Try the following formula:
=50-(A1-1)*10
I am getting the error message too mant arguements. Is there a way to have more than 2 options in an IF statement?
=IF(I3="USD",$B$1*G3,IF(I3="GBP",$D$1*G3),IF(I3="CAD",$F$1*G3),0)
Hello!
Please try the following formula:
=IF(I3="USD",$B$1*G3,IF(I3="GBP",$D$1*G3,IF(I3="CAD",$F$1*G3,0)))
I hope it’ll be helpful.
This equation should work better for you. I took out your unnecessary brackets that had caused the "too many arguments" notifications. (You had your "false" outside of the conditions.)
=IF(I3="USD",$B$1*G3,IF(I3="GBP",$D$1*G3,IF(I3="CAD",$F$1*G3,0)
Hope this works!
Hi
Im using the following formula but it doesnt seem to be working
=IF(OR(J1080:J20001="AUD","2021","2020","2019","2018","2017","2016"),'Economic Assumptions - Forex'!$M$9*K1080)=(OR(J1080:J20001="ZAR","2021","2020","2019","2018","2017","2016"),'Economic Assumptions - Forex'!$M$16*K1080)
Please can you tell me what is wrong
Hello!
I can’t test your formula as it contains unique references to your data. I do not have this data.
However, the condition
(J1080:J20001=”AUD”,”2021″,”2020″,”2019″,”2018″,”2017″,”2016″)
is incorrect. Can only be used
(J1080:J20001=”AUD”,J1080:J20001=”2021″, J1080:J20001=”2020″, J1080:J20001=”2019″, J1080:J20001=”2018″, J1080:J20001=”2017″,J1080:J20001=”2016″)
I hope it’ll be helpful.
I have to come up with a function with the criteria...
D2>5
G2= "B" or "C" or "D"
E2= "marketing" or "finance"
and then if those are true then C2* $Q$23 otherwise 0 is left in the cell.
Hi,
I hope you have studied the recommendations in the tutorial above. It contains answers to your question
This is the formula I came up with, can you help me with what I have wrong, thanks!
=IF(AND(D2>5,OR(G2="B",G2="C",G2="D",OR(E2="Marketing",E2="Finance")))),C2*$Q$23,0)
Hello!
Please use the following formula
=IF(AND(D2>5,OR(G2="B",G2="C",G2="D",OR(E2="Marketing",E2="Finance"))),C2*$Q$23,0)
Hi I am a bit of an excel novice and I, like many, I don't know what I don't know
I am currently using this formula =IF(I14<$G$9,0,IF(I1465,$W$9))) to determine value in a cell for the following conditions
- if age (F14) is less than planned retirement age (SG$9) then pension income is $0
- if age (F14) is <=65 but greater than retirement age ($G$9) then pension income is $T$9
- if age (F14) is greater than 65, then pension income is $W$9
But; the stated pension incomes ($T$9 and $W$9) are indexed to inflation and I cannot figure out how to accommodate the ever increasing values. Any suggestions or help would be really appreciated
Hello!
If I understand your task correctly, you can manually change the values in $T$9 and $W$9. Also in these cells it is possible to use a reference to a cell with an actual value or a hyperlink.
I hope I answered your question. If something is still unclear, please feel free to ask.
I a trying to create an if function in excel 2016 with multiple layers:
if cell a1>50, cell a1*2,
if cell a1<50, cell a1*1,
if cell a1*1<20, must result as 20.
Please help.
Hello!
Please check out the following article on our blog, it’ll be sure to help you with your task: Excel nested IF statement - multiple conditions in a single formula.
I hope it’ll be helpful.
Please let me know how to write following
1 to 30 = Manager
31 to 45 = Regional Head
46 to 60 = Head of Sale
61 to 90 = Credit Operation Team
91 and above = Recovery Team and Legal
1 and below = Before Over Due
Hi,
I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
I kindly ask you to have a closer look at the following paragraph: Using multiple IF statements in Excel (nested IF functions)
I hope it’ll be helpful.
Sir I recruiting some employees for my office. I recevied many applications and I have prepared a list in excel there is a condition that the applcant shouldn't be over the 40years of age and not less than 18years. I have entered the date of birth in column b and calculated the age in column c now i have the values some thing like 30year 2months and 4days now I need a formala to be entered in column D to find out that if the applicant is overage, within age limit or is he underage....
Hello!
Please check out the following article on our blog, it’ll be sure to help you with your task: How to highlight ages under or over a particular age.
If there is anything else I can help you with, please let me know.
I am trying to create an IF/THEN from a drop down list.
C1 would have the drop down LIst: Hamburgers, hot dogs, nachos, pizza
So the cell with the formula would need to perform: IF C1 is hamburgers, $5. If C1 is hot dogs, $2. if C1 is nachos, $4. if C1 is Pizza, $10.
Can anyone help give me a framework?
Hello!
If I understand your task correctly, the following formula should work for you:
=IF(C1="hamburgers",5,IF(C1="hot dogs",2,IF(C1="nachos",4,IF(C1="pizza",10,""))))
In Excel 2016 and above, you can use the IFS function
=IFS(C1="hamburgers",5,C1="hot dogs",C1="nachos",C1="pizza",10)
If there are a lot of products and conditions, I recommend searching for the price using the VLOOKUP function.
I hope my advice will help you solve your task.
Thank you! I will try this out
Hi Everyone
I am trying to write a formula that has few IF conditions eg:
if A1>=25 (age), then if B1=>£8.91, B1 otherwise £8.91 (it does work when A1 (age ) is = 25, if I change it to any other age it throws an error. This is one part of a formula
the full formula should calculate:
if A1>=25 (age), then if B1=>£8.91, B1 but otherwise £8.91, if A1=21, then if B1>8.36, B1 or £8.36
is it possible to calculate? I am really struggling with this, any help appreciated
Hello!
If the number 9 is written in cell B1, then no Excel formula can change the value in B1 to 8.91. This is only possible with a VBA macro.
Our clients have 4 scenarios that produce different outcomes. I am trying to produce a formula for those outcomes -
Columns I & J are the scenario factors, K is the outcome
I2=Y J2=N K2=N
I2=Y J2=Y K2=Y
I2=N J2=Y K2=Y
I2=N J2=N K2=N
I have tried the following, using " " for the Y & N variables, also trying it without the " " and the outcome produces #NAME? with both formulas. I'm sure there is something easy I am missing.
=IF(OR(AND(I2=Y,J2=N)),N,IF(OR(AND(I2=Y,J2=N)),Y,IF(OR(AND(I2=N,J2=Y)),Y,IF(OR(AND(I2=N,J2=N)),N))))
Hello!
One simple formula describes your 4 scenarios
=IF(J2="N","N","Y")
If you have other questions, don't hesitate to ask.
I'm trying to get two texts with the same number value...
home=0.5
office=0.5
any other entry=0
any thoughts on how to do that?
=IF(B5="home"or"office", 0.5,0) didn't work
Hello!
The formula below will do the trick for you:
=IF(OR(B5="home",B5="office"), 0.5,0)
I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
Hello!
Please try the following formula:
=IF(OR(B5="home",B5="office"),0.5,0)
I hope it’ll be helpful.
I need to return 100% in a cell for cells B2/A2. If B2 = 0, and A2= 0, I want the result to be 100% as a goal attainment returning 100% in C2.
Hello!
If I understand your task correctly, the following formula should work for you:
=IF(AND(B2=0,A2=0),100%,B2/A2)
I hope it’ll be helpful.
Hi,
I am trying to create a formula with 3 different conditions.
If J3<5 and K3<5 it should calculate K3-J3+1
If J34 it should calculate 4-J3+1
If neither is true the result is 0
I have tried different variations o the following but nothing works:
@IF(OR(AND(J3<5,K3<5),k3-j3+1,AND(J34),=4-j3+1,0))
Any advice would be greatly appreciated. Thank you
ERROR in 2nd "If" condition I posted.
Should read: If J34, it should calculate 4-J3+1
ERROR in formula I posted.
Should read: @IF(OR(AND(J3<5,K3<5),=k3-j3+1,AND(J34),=4-j3+1,"0"))
I copied and pasted so I am not sure what happened. So sorry for any confusion!
OK so strange - after hitting Send the text changes in my post!
Where it says J34 it should say IF J3 is less than 5 and K3>4.
Hope the 3rd time is a charm! Thanks again.
NEVER MIND - I figured out by studying at least 1,000 questions already answered here over the past few days.
Correct formula: =IF(AND(J3<=4,K3<=4),K3-J3+1,IF(AND(J34),4-J3+1,0))
Thanks to everyone who answers strangers very complex problems on this site. AMAZING!
And once again my formula changed upon posting.
If anyone needs the correct formula - respond to this and I will try to write it again with some other method