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 118. Total comments: 4830
hi friends i want a something mentioned below
if G5 between 90 and 95 then Pass other wise Fail
Please help
Thanks
Can your "value_if_true" or "value_if_false" statements in an IF function reference pull text from another cell?
Need for for calculating if age falls within a certain range then to return a set figure. I have generated this but its giving me no joy:
=IF(AND(B6>=18,B6=31,B6=51,B6<=64),3.5)
Hi,
I have 2 columns with dates in them.
A=Current Due Date
B=Reschedule To date
How can I do a logical test to show in a 3rd column all the reschedule dates are more than a week apart from the current due date?
Thanks,
Hello,
I want to create a formula , for to look in coloumn B2:B100, in cell text contain is "Raj" then print "Raj availabel" in A1 cell
hi,
I have data tabke
date time open high low close
and I want to convert the data for a day/days into time ranges so that I can chck how it moved with each day as a unique day.as the O H L C will chane with in the day only as er time change requested
If I wat to pull the 1st open for a time range, how do I pull the 1st open even though it is not the start time In my report sheet.
it may so happen that the data may start coming only 2-3 seconds later though say at 9:00:03 where as the start time in my query would by 9:00:00
HI,
HOW WOULD I WRITE THE FORMULA TO GET THE FOLLOWING
IF a0,IF(A3="INDIA",6,IF(A3="NEPAL",10,IF(A3="SRILANKA",15,))))),"")
LEADTIME
INDIA = 8 DAYS
NEPAL = 10 DAYS
SRILANKA = 15 DAYS
Hi,
How would I write the formula to get the following:
If A10.99999,A1=0.99999 otherwise = A1.
I want to Winsorise it to be between 0.00001 and 0.99999
Thank you for your help!
Nazi
I want to create a formula. I have 5 types of value like 4.17, 4.33, 4.50, 4.67, and 4.83 I want if 4.17 comes in a cell the dependent cell will show 4 min 10 sec. For 4.33 it will show 4 min 20 sec, 4.50 show 4 min 30 sec, 4.67 show 4 min 40 sec, 4.83 show 4 min 50 sec and 4.00 show 4 min. How can I do it in excel?
the value before decimal is min like 6.17 will represent 6min 10 sec
I have an excel question. I've got a scenario where I'm trying to write and if/or function. Here's what I have so far: =IF(OR(C43=0,C44=0),0,IF(OR(C43120,C44>4),0.15,0.1))). If C43 is between 1-60 or C44 =1, then the discount is 5%. If C43 is between 61-120 or C44 is between 2-4, then the discount is 10%. If C43 is greater than 120 or C44 is greater than 4, then the discount is 15%. Can you help me write this formula? Thank you!
A B C D E F G H
Annual Q1 Q2 Q3 Q4 Annual Q1 Q2
1]3.8 1.08 2.06 0.15 1.1 1.1 1.08 0.89
2]3.8 1.08 0.98 -1.91 0.95 1.1 1.081 -0.183
Hello sir/Madam
I have a question in above situation.
1st condition is Annual & Q1 value be always match . but Q2, Q3,& Q4 value never be match.
if Annual & Q1 value mismatch then it should be an error, and if Q2, Q3, &Q4 match then it should be an error.
now i have try [if(A1=A2,"OK","error")]this formula. but this formula work only Column A & B (e:g Annual & Q1)but it does not work Q2,Q3,Q4
So, could you please help me in this matter....
Thanks
indranath Bag
Hi,
i need a sugestion for this formula,
please look at this
=if(E5>=D5, "E5-D5", " ")
Plese correct this:-
=IF(A1>=A,"5",IF(A1>=B,"4",IF(A1>=C,"3",IF(A1>=D,"2",IF(A1>=E,"1")))))
I J K L M
Year Month Cycle Month Leave Due 4month
2010 5 10 14.67 14.67
2009 11 10 14.67 14.67
M - Formula: =IF(I3>2013,IF(J3>5,0,L3),L3)
What are they trying to determine to get to 14.67
This is a provision for leave days
Hi,
I need help in calulate how many time my staff take MC for the month.
I try this formula,
(=IF(N28="MC","1")+IF(N29="MC","1")+IF(N30="MC","1"), its work but I have to key every cell for the whole month that will be very long, any way to shorten it.
My range is from N4 to N38
Hello,
I have a sheet which serves as my database with daily information and I want to create a summary sheet using data from the database sheet (DB). So what I want to say is if column A (from the DB) is today's date and Column B (from the DB) is Summer2015 then give me the figure (total visitors) of column C (from the DB) into a new sheet to create my summary sheet. I want to do this process using the past four years of data to compare what the total visitors was today compared to the date last year. So if today (2015)I had 1000 visitors, last year September 1, 2014 I had 600 visitors, 2013 August 3 I had 1500 visitors. I have other data I want to compare but if I can help with this one I can do the others. Thanks.
hi,
wanna print the entire row if cell value has as part of string.
say if cell A2 has "421." want to print entire row 2. actually value of A2 is "421.52.4587"
Thanks in advance
hi,
wanna print the entire row if cell value has as part of string.
say if cell A2 has 421
I have 4 columns
A= Number of registrations (33)
B= Number of errors (1)
C= B1/A1 which equals 3% (formatted as a percentage)
D= sum(1-C1)which equals 97%
How to I get rid of the #DIV/0! if A1 and/or B1 = 0 (zero) ??
Frustrated,and hoping you can help.
looking for code for an Excel IF THEN where
if H11 says "Customer Pick Up" or "Delivery" then Rows 59 through 62 are hidden
if the value of H11 is anything else it can remain unhidden
Thank you in advance for your help!
Is there a way to convert the string "2015-08-26T14:22:27.306-04:00" to a readable date and time by creating a formula to ignore the T, and convert the date and time? It is not feasible to do this by hand as my data is in the hundreds, and grows everyday.
Hi. I just wondering what is the formula to get Overtime Hours. The Normal hours is 8 and the Overtime Rate 1.5.
Hope you can help me with this.
Thank you.
Louie
I'm having problems trying to figure out the first name, last name, hours worked per day on a five-day workweek, with hours. worked 45, hourly wage $9.75, overtime hrs.5 at a time and a half, and the total earnings.please help me, I will be forever grateful.
i have cell A1 with value 1.5.
i want a value in cell A2. if value in cell A1 is less than 0.8, 0.8 should come in A2, but if value in Cell A1 is more than or equal to 0.8, same value should come in A2. like in my case 1.5.
i tired this =IF(A1<0.8,"0.8","A1"), but its not working. i am getting text A1 in cell A2 not value 1.5
please reply
Hi Rahul,
In Excel formulas, numbers and text references are not supposed to be enclosed in quotes. As soon as you remove them, your formula will work fine:
=IF(A1<0.8, 0.8, A1)
Dear Admin, I want to ask for help
Here is my condition:
- i have a table A to get the status "YES" for the first condition
- i have a table B to search the value-text within, which is the name of the employees
- and the third table C as a result
I put this formulas at C that i wish to get 1.5 if "2 condition met" and 0 if "false"
=IF(AND(H4="YES"),IF(ISNUMBER(SEARCH("name1",row1)),0.15,IF(ISNUMBER(SEARCH("name1",row2)),0.15,IF(ISNUMBER(SEARCH("name1",row3)),0.15,IF(ISNUMBER(SEARCH("name1",row4)),0.15,0)))),0)
The problem is: when i add one more row (row5) it always give me "you've entered too many arguments for this function". Is there any other possible formula for me?
Thank you very much
Hi id like to create a formula using If condition wherein you have three ..
For example
I use =if(or(c27=40,c19*c26,c27=60,c20*c26,c27=80,c21*c26)) how can i checj this?it is always error
Hi Grace,
Use a nested If formula like this:
=IF(C27=40, C19*C26, IF(C27=60, C20*C26, IF(C27=80, C21*C26, "")))
Hi
I want a formula to add several cells if they have a value say greater than £0.01. say cells B5 to B10 have a value greater than £0.01 and cells B11 to B13 do not have a value. so the count should be 6 and the cells that do not have a value turn red.
Thank you.
Hi
I want a formula to add several cells if they have a value say greater than £0.01. say cells B5 to B10 have a value greater than £0.01 and cells B11 to B13 do not have a value. so the count should be 6.
Thank you.
i have a price list in sheet number 1 and an invoice in sheet number 2
and i want to make an if function to help me when i write the code in the invoice the excel bring the price from the price list sheet.
Thanks Svetlana, that works for my intent and purposes with a bit of mods. Now if you can help me with one more....
I have 2 sheets containing about exact same data, but Sheet1 has several cells in Column B highlighted in Blue. How can I run a formula to color the matching cells on Sheet2 to be blue?
Hi Jay,
If you want to highlight cells on sheet2 that have the sames values in the same cells on sheet1 (regardless on cells' background color or other formatting), you can create a conditional formatting rule with the formula similar to this:
=$B1=Sheet1!$B1
For the detailed step-by-step instructions, please see:
https://www.ablebits.com/office-addins-blog/excel-conditional-formatting-formulas/
If you want to highlight cells on sheet2 corresponding to blue cells on sheet1, there is no formula for this, and the only way is writing a VB script.
Hi guys, extremely helpful site. I have a simple one. I have a sheet with several names in say Column B. Column C is looking for the City. If Sam is found in Column B, return Toronto. If Joe is in Column B, return London. Sam, Joe and the other names occurs multiple times in Col B.
Thanks
Hi Jay,
I think the VLOOKUP function fits better for this task. You can find a few examples of uses in the following tutorial:
https://www.ablebits.com/office-addins-blog/excel-vlookup-tutorial/
It omits "Not Equal" '' signs in the formula :(
Correction - =IF(D6"",D6/E6,"")
Hi Svetlana, I need your help,
I am displaying data in line graph but want to stop the line if there is zero instead of taking the line to '0' on X axis. There is a formula on the cell hence nothing is working, can you please help, have tried - 'Select Data -> Hidden and Empty Cells - > Gaps' but it does not help. Formula in the cell is
=IF(D6"",D6/E6,"") and the cell displays blank without any value if D6 is blank yet it takes 0 in the graph.
Thanks
Please help if possible!
Basically due to weekends (C Column is date included in metric sheet which i can change for data to be used within charts) some values in the F&G Column are 0 so it is returning #DIV/0!. I would like it if the values are 0 to put a "-" in. Is this possible?
This is the formula i have at the moment.
=IF((C3="Yes"),(F10/G10),"")
Hi Ryan,
Enclose your IF formula in the IFERROR function, like this:
=IFERROR(IF(C3="Yes", F10/G10, ""), "-")
Hello,
guys please assist me here:
column A1 to A100 has data i.e. 2, 3.5, 11, 25, 1, 90 etc
In column B, I want to display numbers less than or equal to <=1.5.
The formula must read data in column A.
kind regards
Hi Jonno,
You can use the formula =IF(A1<=1.5, A1, "")
Hi again.
I'm going to send the attachment.
Thank you
Louie
Hi Svetlana,
I tried the IF function together with VLOOKUP and its still error. Can you please help me.
im desperate with this.
thanks.
louie
Hi. I just wondering, Im trying to get the tax rate tax and net pay using VLOOKUP but my always get me wrong (#NAME)
If you could help me on this love. My head is like spinning trying to get the correct formula for tax rate.
Thank you .
Louie
Hi Svetlana cheusheva,
can I have your email ID. I WOULD LIKE TO SEND YOU MY EXCEL FILE ON THE COMPETENCIES THAT I HAVE MENTIONED EARLIER
Hi Svetlana cheusheva,
I have employee competencies for each position in worksheet and I want when I select the position in the other worksheet, I want all the competencies appear automatically. what is the formula please
Hi Svetlana cheusheva,
I need your help. I want to have a formula based on the appraisal rating. i.e AI IS 0 UNSATISFACTORY (no increment), A2 IS 1 TO 1.4 SATISFACTORY (increment from 1% to 3%), A3 IS 1.5 TO 2.4 GOOD (increment from 4% to 7%), A4 IS 2.5 TO 4.4 VERY GOOD (increment from 8% to 10%) AND A5 IS 4.5 TO 5 EXCELLENT (increment from 11% to 15%). My question is I want to have a formula in increment coloum which once I put the rating, automatically the increase amount % will show.
for example an employee rated between 1 to 1.19, his increment will be 1%, if he rated 1.2 to 1.29, his increase will 2%, if he rated between 1.3 to 1.4%, his increase will be 3%
Hi i want to change the Text with one excel sheet but i also want the text should change in other two sheet where the same date i have. but the other two sheet contain same data but there position is not same with the first one. for example I have a word " World" in column A and cell 1 but in other sheet i also have a word " World" in Column A but It's Cell in 8. Can you help me.
please how do i create an IF function that denotes "1" when the response in a cell is "yes" and "0" when "No" is keyed in?
thanks
Hi Nonso,
Here you are:
=IF(A1="yes", 1, IF(A1="no", 0, ""))
Hi Svetlana cheusheva....
how to use if condition in my ques.......
plz tell me......
* display sales order after 2-jun,product name beginning with letter "G"and unit sold in excess 100.
* display all details ; sales date on 1-jan or 3-jan and number of unit sold less then 150.
* list those records sales date and 2-jan ; unit sold less then 150 and product name ending in letter "est".
* display all records for countries in state of Florida with words north or south in country name and land area are more than 500.
* display those records for countries in the state of California or Colorado with population between 200000 and 300000 and having unit of more than 100,000.
plz tell my frnd svetlana.......
who to convert 5421 to five thousands four hundred twenty one in excel
Hi Svetlana cheusheva....
how to use if condition in my ques.......
plz tell me......
* display sales order after 2-jun,product name beginning with letter "G"and unit sold in excess 100.
* display all details ; sales date on 1-jan or 3-jan and number of unit sold less then 150.
* list those records sales date and 2-jan ; unit sold less then 150 and product name ending in letter "est".
* display all records for countries in state of Florida with words north or south in country name and land area are more than 500.
* display those records for countries in the state of California or Colorado with population between 200000 and 300000 and having unit of more than 100,000.
plz tell me frnd svetlana.....
Hi!,
I am trying to make a formula that will return the calculated value from another cell if a "check" boxes has a √ or even simple X in it, but return blank or 0 if left unchecked. I used =IF(B2="x",A1,0) where B2 is the bordered "checkbox" and A1 is the value from formula calculation in that cell.....
What I get is "0" if ii put an x in the box and "-" if I leave it blank/unchecked?!
Hi Svetlana cheusheva....
plz giving to my ques. ans....
* display sales order after 2-jun,product name beginning with letter "G"and unit sold in excess 100.
* display all details ; sales date on 1-jan or 3-jan and number of unit sold less then 150.
* list those records sales date and 2-jan ; unit sold less then 150 and product name ending in letter "est".
* display all records for countries in state of Florida with words north or south in country name and land area are more than 500.
* display those records for countries in the state of California or Colorado with population between 200000 and 300000 and having unit of more than 100,000.
how to write in if condition..... my ques...
Hi,
I am looking for formula with multiple if conditions.
some what like this;
=if(J2="Chemicals","Heavy Industries->Chemicals"),if(J2="Medical Devices","Healthcare->Medical Devices)
but this one does not work. and I have to apply same for another 7 conditions.
Can any one help.
Hi Sam,
The correct syntax of nested IF's is as follows:
=IF(J2="Chemicals","Heavy Industries->Chemicals", IF(J2="Medical Devices","Healthcare->Medical Devices", ""))
Please can you help me?
need to calculate if a cell (D58) has inbetween 6 and 12 in then it should equal F7 (which is £25.58).
The cell before i need to know if the number was 5 or under so i =SUMIF(D58, "<=5",F6:F6) which is working fine.
After i have figured out the 6 - 12 one i need to do the same for 13-18 and then one for 19 +
Hi Laura,
>if a cell (D58) has inbetween 6 and 12 in then it should equal F7 (which is £25.58).
You can use the following formula:
=IF(AND(D58>6, D58<12), F7, "")
And for multiple conditions, you can use nested IF's:
=IF(D58>19, F9, IF(D58>12, F8, IF(D58>6, F7, F6)))
If D8 is 5 or under, return F6
If D8 is between 6 and 12, return F7
If D8 is between 13 and 18, return F8
If D8 is 19 +, return F9
Thanks