IF is one of the most popular and useful functions in Excel. Generally, you use an IF statement to test a condition and to return one value if the condition is met, and another value if the condition is not met. Continue reading
by Svetlana Cheusheva, updated on
IF is one of the most popular and useful functions in Excel. Generally, you use an IF statement to test a condition and to return one value if the condition is met, and another value if the condition is not met. Continue reading
Comments page 84. Total comments: 4830
Nice greet tutorial of if function, very useful and informative
I want to put a formula for assigning a person job from a start date to end date .
How to put a formula to ensure that person is not reassigned during the given start and end date.
Regards
Ravi
I want to write a function that will evaluate if a cell is >1, and if it is, copy the text in any designated cell and copy that text to another cell
Thanks
Hi Don,
You can use a formula similar to this:
=IF(A1>1, B1, "")
Where A1 is the cell to evaluate, and B1 is the cell to copy the text from.
Hi,
Excel has always been my downfall. I need your help please.
I need for D5 to show as either 0% or 25% data is from
D4:D14 which would either contain Yes, No and blanks , Should any of the cells fro 4-14 contain a no then D5 should show as 0% and if 4-14 cells have a YES including the blanks then D5 should show as 25%.
Your help is much appreciated.
Hi Michele,
Try this one:
=IF(COUNTIF(D4:D14, "no")>0, 0%, 25%)
what formula can i used for this
Good 4.00-4.59
Average 3.00-3.59
Fair 2.00-2.59
Poor 1.00-1.59
if the result would be 5 i want to automatically give the corresponding rating equivalent. please help thanks.
I have 3 Worksheet, one is for purchase statement, second is for sales statement and another is for stock statement. Now in purchase & sales statement against all different types of equipments there are serial no. (eg. ASHD-0674) Suppose I have purchased 25 nos. different equipments which has 25 different types of serial nos. and I have sold 19 Nos. equipments out of 25 Nos. purchased. Now in Stock Statement I want to see which serial nos. of equipments I Purchased, sold and which serial nos. in my stock. Please clarify.
Hi,
Please help to solve my query, I want to pick city name in separate column from excel formula.
INST_ADDR Output Required
asasdsdddAzadpur, Azadpur New Delhi, New Delhi, 110033 Azadpur
asasdsdddGreater Noida New Delhi, New Delhi, 110033 Greater Noida
asasdsdddNoida New Delhi, New Delhi, 110033 Noida
dfdfdfdGurgaon,New Delhi, New Delhi, 110033 Gurgaon
1fdfdf11 GK New Delhi, New Delhi, 110075 GK
dfdfdfdDwarka,New Delhi, New Delhi, 110033 Dwarka
dfdfdfdGhaziabad,New Delhi, New Delhi, 110033 Ghaziabad
Regards,
neeraj Kaushik
I have a column in Excel. User points to a cell in the column. A drop down menu populated as follows: 1/4 in screws, 1/4 in screws, 1.2 in screws. When the user selects any one of these, the associated part number is entered in the cell. How do I do it in Excel?
Hello,
I have been attempting to figure out a formula for an issue I have for a while. I'll try my best to explain it, but referring to my below examples may be your be more helpful. I have a 86K plus spreadsheet in which I need to combine multiple cells into a single cell if certain criteria are met.
Raw Data Example:
A 1 2 3
B 23456 Coffee
C 8975 Tea
D 99238 Soda
E 23456 Tea
F 23456 Soda
G 8975 Soda
I need a cell in column 3 to combine what column 2 has every time a number in column 1 matches.
What needs to happen Example:
A 1 2 3
B 23456 Coffee Coffee;Tea;Soda
C 8975 Tea Tea;Soda
D 99238 Soda Soda
E 23456 Tea Coffee;Tea;Soda
F 23456 Soda Coffee;Tea;Soda
G 8975 Soda Tea;Soda
Thank you,
Ashley
Salary Exemption Salary 0 100000@15%
@25%
1,485,079 400,000 1,085,079 4,000 15,000 246,270
300,000 350,000 524,759 4,000 15,000 106,190
I need if the Annual Salary is More then 400000 or 350000 multiply 1% on Exemption otherwise multiply 1% on A
Hi, please can you help me, I am busy with a deal comm excel sheet, I need to create a drop down box with "inclusive / exclusive" and then when either button is clicked the value on the formula needs to be linked from the selling price. How do I do this?
I've 5 different sheets of data with heading of each sheet is Normal /Urgent / very urgent / Platinum / Emergency and each having different data. if the order is urgent then it should select data from Sheet "URGENT" for that particular country / product / kg / rate. I've around 50 countries and 400 destinations. Pls advise how to create a formula for this complexity.
Sir/Madam
I wanted to know the IFCOUNT condition for bank use for example
State Bank of India put the NEFT charges for other banks except SBI the criteria is
UPTO AMOUNT CHARGES
10000/- 2.87
10001 100000/- 5.75
100001 200000/- 17.25
200000 ABOVE 28.75
requesting you to help in this regard.
Thanks & Regards
Ibrahim Khan
Hi Ibrahim,
Please consider amount in A1 cell.. then follow below formula...
=IF(A1>200000,A1*28.75,IF(A1>100000,A1*17.25,IF(A1>10000,A1*5.75,A1*2.87)))
Hi,
Ive created a dropdown list (periods 12) to pull data for various months depending on the period selected. I have 2 summaries, In the month, which pulls the current month and for that I used sumifs and used the display in the dropdown box as the condition for result, however for year to date which requires summation of more than one period I am having difficulty figuring out what function would allow me to link to the drop box to automatically update. Currenty I am using if and have 12 stipulation which is quite long (eg if(a2=y1,sum y7:y8, if(a2=y2,sumy7:y9.....etc have to do this for 12 periods. Can you help?
Hi,
I am trying to do an IF function where Excel would return:
1 when the cell has Monday in it
2 when the cell has Tuesday in it
3 when the cell has Wednesday in it, and so on.
The cell that has the weekday (Monday) in it has a formula =A3 where the cell A3 would be a date. For example, A3 = 13/7/2016, B3 has a function =A3 (formatted to return 'Wednesday'), C3 would have an IF function returning '3'.
How do get this IF function to work?
can someone help me how to compute
if A5 is equal and not less than to 7083 then compute for (A5-7083)*.20 + 354.17. or if A5 is equal or not less than to 10,000 then compute for (A5-10,000)-.25+937.50
I don't understand your question 354.17 "or" if A5...
should be "And"?
Try this:
=IF(AND(A5>=7083,A5=10000,(A5-10000)-0.25+937.5,))
Can someone help me please?
I need a formula showing the following:
=IF(B10>=50,"50",IF(B10<=51,"SUM(B10+B13)"))
If the field B10 is greater than 50, then it should be 50, if the field B10 is less than 50, then it should be the sum of B10 + B13.
But with the way the formula is written, if B10 is less then 50, then it showings SUM(B10+B13) in the field instead of the sum of B10 plus B13.
You can change:
=IF(B10>=50,"50",IF(B10<=51,SUM(B10+B13)))
Please let me know formula for converting numbers of 1,00,00,000 & 10,00,000 & 10,000 & 1000 & 100 & 10 & 1 digits in text format in other cell in excel.
Hi
Could someone help me with a formula
Create a formula for each title under the heading re-order to display the text order if the remainnin stock is below 3 or no if not
I have a drop down list for customer number and wanted for the customer name to populate when the customer number is typed in. Would this be a "if" command. If so can anyone assist.
Hi, I have a problem with loop.
The idea is that i enter a number at A1
I want to know if the number
====================================
less than of equal to 100 13
101 to 500 7
501 to 1000 7
every 1 to 500 thereafter 6
====================================
For example, i enter 450, the result is 13.
550, the result is 13+7=20.
I just know one step. "IF(A1<=500,13)"
Please help.
====================================
less than of equal to 100 = 13
101 to 500 = 7
501 to 1000 = 7
every 1 to 500 thereafter = 6
====================================
Hi,
I have a problem where I have to write if function in Excel VBA as follows:
Module1 = Cells(j, 80).Value
Module2 = Cells(j, 81).Value
Module29 = Cells(j, 108).Value
Module30 = Cells(j, 109).Value
If Module1 = "A" Then
Cells(i, 9) = Module1
End If
If Module1 = "B" Then
Cells(i, 9) = "Good”
End If
If Module2 = "A" Then
Cells(i, 10) = Module1
End If
If Module2 = "B" Then
Cells(i, 10) = "Good”
End If
I have to input 30 times from Module1 to Module30.
I have changed Module1 to “Module” & k (k for next loop is added).
It does not work.
Module1 not equal to “Module” & k
Amended
For k = 1 To 30
If "Module" & k = "A" Then
Cells(i, k + 8) = "Module" & k
End If
If "Module" & k = "B" Then
Cells(i, k + 8) = "Good”
End If
Next
Can I use this method in “If” fuction? How to solve?
Many thanks.
hiii sir,
please find the following details, in credit column some amt is there that amt should be come automatically to particular column which i have mentioned,
please help me which formula i have to apply.
cr amt name bs kr sn
6123 DC
4450 BS
1871 SN
1871 SN
887 KR
6711 BS
I'm trying to get the cell to return a blank if it finds the referenced cell also blank:
=IF(F3"CodeList",LEN(D3),IF(F3="CodeList","0",IF(ISBLANK(F3),AZ3,BZ3)))
=IF(F3"CodeList",LEN(D3),IF(F3="CodeList","0",IF(ISBLANK(F3),"","")))
I tried it both ways, using known blank cells that will always be blank (AZ and BZ), and also using "". It performed the first two in the formula, but always returns a "0" if the cell is blank.
Also took off the [value_if_false] at the end of the formula to mirror what I was seeing in here, but didn't work either. Always getting a "0" when = CodeList or is blank.
HOW DO I FORMULATE IF THE "VALUE_IF_TRUE" IS A COMBINATION OF 2 WORDS FROM DIFFERENT CELLS.
=IF(C49="2",I47&" "&D8,IF(C49="1"," "," "))
THE I47&" "&D8 SHOULD BE WHAT IS WRITTEN IN CELL I47 AND CELL D8
if cell contain text how to count
How to write the formula to count the no of Sundays beet ween two dates (ex-30/06/2016 beet ween 15/07/2016)
Hi jayantha,
You can use the following formula:
=INT((WEEKDAY(A1-1)-A1+B1)/7)
Where A1 is the start date and B1 is the end date.
Hi,
I am interested to set a formula to process student's marks.
If (A1-B1)or (B1-A1)is less than 17, D1 is (A1+B1)/2
But If (A1-B1)or (B1-A1)is more than or equal to 17, D1 will be average of C1 and either A1 or B1 which is closer to C1.
Thanks in advance
i have question for you,
based on my excel sheet two column is there example document type and posting key column is one sheet if this column match in second sheet document type and posting key column i have to update the remain second sheet data to first sheet.
please help on this query!!!
regards,
siddesh
Hello, Sanket,
Please try the following formula:
=IF(B4>DATEVALUE("11/14/2015"),"15%", IF(B4>DATEVALUE("05/31/2015"), "14.5%", "14%"))
Hi I Wanted to Set Excel Formula For The Three Condition Like
1.If The Date Fall Before 31.05.2015 The Rate Of Service Tax Will Be 14%
2.If The Date Fall Before 14.11.2015 The Rate Of Service Tax Will Be 14.5%
3.If The Date Fall After 14.11.2015 The Rate Of Service Tax Will Be 15% What Would Be The Formula For That Said Question
r u get answer?
I am trying to use an "if" function that looks at the closing value of the loan principal column (D)... if the value is negative (loan is paid off), the function will populate the specific month the loan value turns negative (the qrtly payment dates are contained in column A), into a cell at the top of the page. Is this possible?
Hi,
Is there a way to display a value based on information across 2 cells. So for example I have 2 products with data detailing the month purchased so want the output to detail the product purchased or both. So the example below the value would come back under product bought for Cust 1 "Both", Cust 2 and 3 "Product 1" and Cust 4 "Product 2"
Cust number Product bought Product 1 Product 2
1 February April
2 March None
3 January None
4 None August
Thanks,
Lee
Hello, Lee,
Please try the following formula: =IF(AND(ISBLANK(C2),ISBLANK(D2)),"None",IF(AND(ISBLANK(C2),NOT(ISBLANK(D2))),"Product 2",IF(AND(NOT(ISBLANK(D2)),ISBLANK(D2)),"Product 1","Both")))
Hi
I just want the if formula to return the same value that is in a particular cell, or make a caculation.
it reads like this right now =IF(F3=" ",C3,((C3+F3)/2)).
In case cell F3 is empty, i want to display the same value that is in cell c3. However, if f3 is not empty, I want to calculate the average)...
right now it is just returning to me the result of average calculation ((C3+F3)/2) even if the f3 is empty...
Can you help ?
Hello Rob!
In your formula, there is a space between the quotation marks =IF(F3=" ",...).
Remove it and the formula will work fine: =IF(F3="",C3,((C3+F3)/2))
Awesome !!!
Thank you !
How can I submit some more questions, but using the actual file/spreadsheet ?
I have some Pivot Table related questions and i think it's hard to explain...
Thank you Andrei for your help !
Hello Svetlana,
I have a seemingly simple formula, not sure why it doesn't work on me!
=IF(ISNUMBER(SEARCH(OR("May-16",AX3),OR("Apr-16",AX3),OR("Mar-16",AX3))),1,0)
I need a 0 or a 1 if the value in AX3 equals Mat-16, Apr-16 or Mar-16.
This doesn't work either =IF(OR(AX3="Mar-16",AX3="Apr-16", AX3="May-16"),1,0)
Please help!
Many thanks in advance
Hello Anon!
You cannot compare a date with the text string "Apr-16".
Use the following formula instead: =IF(AND(YEAR(AX3)=2016,OR(MONTH(AX3)=3,MONTH(AX3)=4,MONTH(AX3)=5,)), 1, 0)
if i type A1 in cell B1 then i want the values in A1 in C1, please ans
Hello Ajay,
You can enter the following formula in C1:
=INDIRECT(B1)
I want the cell to increase by $1.00 for every 6 pieces. So if I have 13 pieces it should be $3. I created this formula but it's not correct, please help.
=IF(B32<=6,"$1.00") OR(B32,7==13,"$2.00""∞")
Hello!
Can you help me to create this formula:
1 to 4 = LOW
5 to 9 = MEDIUM
10 to 14 = HIGH
Thanks in advance :)
Hello Roy!
You can use this formula: =IF(AND(A1>0,A1<=4),"LOV",IF(AND(A1<=9, A1>4), "MEDIUM", IF(AND(A1<=14, A1>9),"HIGH", "out of range")))
If a value in cell A is false and the value in cell B is within the range in cell C and D (assuming cell C if 99.0% and cell D is 100%), enter the value in cell E. Please help me in creating f formula for that. Thanks
Hi! Can you please help me with this?
For example: I want a cell to display "done" if material down and machine down was met and if not, it will display "attention".
=IF((AND(Z3="Material Down","Machine Down")),"Done","ATTENTION")
Hello Dev Reyes!
In the AND statement, you forgot to specify the cell that should contain "Machine Down". For example:
AND(Z3="Material Down",Y3="Machine Down")
And the whole formula would be:
=IF((AND(Z3="Material Down",Y3="Machine Down")),"Done","ATTENTION")
hello,ma'am I have Excel sheet of Indian population and I have to classified accordingly by Tier -1 to Tier -4 so how can I put condition in this sheet.
Tier-1 =10000000 population
so on till tier -4
Thank you.
Give me a formula for making a result sheet in which i want the result
there is four NOS(Subject)
if student's marks in all NOS is 0 Then Absent.
if student's marks >=70 in all NOS Then Pass.
if student Passs a NOS and fail in rest of the three NOS Then NOS PASS.
if student's marks in all NOS is <70 Then Fail
Hi, i cannot seem to get this formula down.
Use an IF function in cell J18 to calculate the commission earned for beverages for order 1. The beverage commission is 10% of the total sale if the customer buys a beverage. If the beverage sale amount (cell D18) is greater than 0 the beverage commission equals the sales total (cell G18) multiplied by the beverage commission rate (cell G12). Otherwise the beverage commission is 0. Use appropriate relative and absolute cell references.
I am trying to create a formula that if text = (specific text) then add 1, and the total number of (specific text) fields there are in that column.
I have a specific ticket type for an event in column F in this spreadsheet, and I am trying to create a formula at the bottom that will tell how many of each ticket type there is.
Hello Jeanette!
To count the number of cells with a "specific text" you can use the COUNTIF function. For example:
=COUNTIF(B1:B8,"specific text")
Hi Guys,
Please help on the following:-
Gross profit margin>=20% = 0.7%
Gross profit margin>=25% = 1%
Gross profit margin>=30% = 1.5%
Gross profit margin>=35% = 2.0%
Gross profit margin>=40% = 2.5%
Hello Theng!
You can enter the following formula: =IF(F1>=40,2.5,IF(F1>=35, 2, IF(F1>=30, 1.5, IF(F1>=25, 1, IF(F1>= 20, 0.7, 0)))))
F1 contains Gross profit margin.
I have a spread sheet that as A as the Roster, B as the Go or No Go, C as a number value between 1-40, and D as 4 classifications.
1-23=Unqual (NOGO)
24-29=Mark(GO)
30-35=SS (GO)
36-37=Ex(GO)
I want to make a formula that when i type in the number value in C, it will automatically fill in B and D with the info i need based on the table above all the way down the rows.
Hello, thanks for your time.
I'm building a spreadsheet in which I have a list of names, and need these names to represent a value. For instance, if cell AL5 states "COL", "TOR", or "BAL", it should be assigned a value of two, but if cell AL5 states "TEX", "BOS", "NYY", or "ARI", it should be assigned a value of 1. Please help put together a formula to do this; I've got the first part at =(IF((OR(AL5="TOR", AL5="BAL", AL5="COL")), "2"))
I have a spreadsheet in which I the if has 2 requirements to be correct, and if so then it will be this number, but if its below it needs to equal zero, and if it is above it equals a fixed number. How do I get it to have 2 options if false?
=IF(AND(F1>29999,F1<70001),(F1-30000)*0.02,40000*0.02)
the 40000*0.02 is if its greater than 70001 but if it is less than 29999 then it needs to be 0
any help?
Hello Chase!
You can use two nested IFs:
=IF(F1>29999,IF(F1<70001,(F1-30000)*0.02,40000*0.02),0)
Hey All
I would appreciate any guidance on the following formula please:
If column A =1 and column B = 2 return X otherwise return Y.
Many thanks
Alice
=If(A1=1,If(B1=2,"X","y"),"y")
Hello everybody!
That seems so simple but I can't do it :(
I would like to know the formula for this:
If any text is found in cells T23 U23 V23 or Z23 this same text should be copied to this cell where the formula goes (C23).
This text could be any of these four: Apple/Pears/Peaches/Grapes
Thank you so much
Hi Augusta,
What if 2 or more cells (T23, U23, V23, Z23) contain different texts? Which one should be copied to cell C23?