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 109. Total comments: 4830
Hi Svetlana
Imam kolona B so brojki od pravecot na veterot( vo stepeni) od 0 do 360. Vo kolona C treba namesto brojki da stoi samo znak so strana na svetot ( I,Z,S,J,SI,SZ,JI,JZ). Probav so slednata formula ama nekade gresam.
IF(OR(B2>=337;B2=23;B2=68;B2=113;B2=158;B2=203;B2=248;B2=293;B2<=336);"NW"))))))))
Molam za pomos. Fala odnapred.
I have a column B with numbers of wind direction (deg) from 0 to 360.In column C How to change number to data ex: if wind direction is 0 = N, 46=NE,....
=IF(OR(B2>=337;B2=23;B2=68;B2=113;B2=158;B2=203;B2=248;B2=293;B2<=336);"NW"))))))))
hello sevena, i can not use IF function for the rate of percent.how to use it on the excel program. for example: how to find the rate of 88% (percent). =IF and what i should write something then
Hi,
i want to use the function to write a value in another cell whether the result is true or false.
For example: if cell (A1+A2)>3; true: A3=4; false: A3=0
Is it possible or it is with another function?
Thanks in advance!
If you want the cell A3 to always display 4 in case its true, the formula would be:
IF((A1+A2)>3,4,0)
Now, if you want the cell A3 to display the result of A1+A2, then the formula would be:
IF((A1+A2)>3,(A1+A2),0)
Hi,
So I have two tables. Table 2 is named "Servers" has two columns. One column with a list of databases and the column next to it with the list of servers those databases are located on. Table 1 is for data entry. I want the cells in Table 1 to auto populate the associated server name when the database name is input.
I'm an excel noob I'm sorry.
=IF(H72=(*a specific value found somewhere in column C in table "servers",*the value in the column B in the same table, *if no value exists remain blank))
I hope you understand.
Nevermind I found it!
=INDEX(Servers!A:A,MATCH(H64,Servers!C:C,0))
I'm using IF statement to compare due date with today's date to provide a priority number on my task worksheet. However I want to add to this formula by showing "Completed" if the task is done. This is the formula I am currently using =IF(C9<8,1,IF(C9<15,2,IF(C930,4)))) where C9 has an updated number of days left before due date. How can I insert "Completed" into this from my status cell G9? Please let me know if I need to clarify more.
Alright so I have this formula I'm working on:
{=IF('[Jobs Bills & Due Dates.xlsx]Billing'!$B$20:$I$28"",IF(((LEFT('[Jobs Bills & Due Dates.xlsx]Billing'!$B$20:$I$28,10)+45)-TODAY())>30, SUM(IFERROR(SUBSTITUTE('[Jobs Bills & Due Dates.xlsx]Billing'!$B$20:$I$28,LEFT('[Jobs Bills & Due Dates.xlsx]Billing'!$B$20:$I$28,14),"")*1,0)),),)}
It involves the values of an array form another Worksheet.
In each cell of the given array, the values we input are always "10-characters long date(i.e. 12/10/2015), "space dash space", "$(money symbol)" and the amount for that bill". (ie. 12/10/2015 - $1000)
On that formula, I want to add all the money values (hence the whole IFERROR formula) that have the "due date" above 30 days left (hence the +45 - TODAY() formula).
But right now it's returning a value of 0.
Please help?!
i have many cell and all have different values like 33.3,35.8,ets.
i want that in the lower cell of all those cell to be written as available or not available.
If( C8=35.8, C8=33.3, ......, "avail")
Need help if(A1="number","Yes",if(A1="text","No","wrong"))
Thanx your support
I need a formula...This is what I tried (I have also tried adding "and" and "or" in there, but keep getting a False....I'm Stuck!
=IF(B2="Male", IF(B6="Very",X20,IF(B2="Female",IF(B6="Very",X14,IF(B2="Male", IF(B6="Light",X18,IF(B2="Female",IF(B6="Light",X12))))))))
I have a drop down list in B2 (Female, Male)
I also have a drop down list in B6 (Light, Very)
I have numbers for a male light and male active (X18, X20) and female light and female active (X12, X14).
In Cell C2, I want it to populate the number from X18 if I choose Male, Light....or populate the number from X12 if I chose Female Light. I can get it to work separately (selecting Male, Light - I will get the correct number, however if I select Female, Light - I will get a "false"). Any help would be greatly appreciated.
hi team,
how can I get the total number of "yes" and "no" in excel sheet ?
For eg:- I have used Column B3 to B35, this can be Yes and No according to jobs closed.
Hello Kullan,
You can use the following COUNTIF formulas:
=COUNTIF(B3:B35, "yes")
=COUNTIF(B3:B35, "no")
i need a formula for finding same/duplicate nums in a column
Hi everybody,
I'm working on science project concerning development of some drug formulation, we created an excel sheet where each formula is in new tab and each tab contains table with the following row names (Ingredients & qty). Also, there is a tab which we sum all those formulas together. the problem is we may insert or delete ingredients and we want to write an "IF" function (for example Tab1 Cell A1 = Cell A1 in Tab2 and if not equal insert new row containing new data.
thanks
Hello can you please help me.
I have a bunch of sections (100,101,102...) and dollar amount for those section it is sorted by date so the sections repeat constanly and I need to get all the totals for each section.
On this case Column A is the section(100), column B is the dollar amount for that section. there are multiple columns for section 100 how do I add them without having to do =IF(A1="100",B1,0)+IF(A3="100",B3,0)...
=IF(A1="100",B1,0)
=COUNTIF(A1:A16,"100")
I think it might be a combination of the two but with B1:B16.
Please help
Thank you
I am working on a project for me. I am currently copying specific fields from one sheet to another. But, I want the copy to be based on a past date. How do I go about doing that. So, I am think if Sheets1 (H2:H10) <Now then copy.
I am using a macro do all the copying..
A B C D E
1 yes 20 20 C1 =IF(A1=YES,B1)
2 no 20
3 yes 10
4 yes 8
5 yes 15
6 no 10
All yes total = How do I add all yes responses value of B to total?
I need to add all of the values for response yes to a total cell.
Please help
Hi,
Is it possible to return the values in specified cells when the condition is met. Please advise.
Thanks in advance
Hi,
I have been trying to use an IF formula to search whether a supplier is VAT registered or not where an equation would be done if True and if FALSE there would be a result of 0. All VAT registered suppliers have VAT alongside name.
=IF((SEARCH("VAT",J15,1)),(K15/6),0)
Used this equation and if TRUE it seems to work however if FALSE a "#VALUE" error shows.
Any idea whats going wrong.
If A1<=26 and b1<=270 than i should get 100%
and
if A1<=24 and b1<=250 than i should get 90%
which formula i should use?
Hi I am new to excel.
I would like to have a formula for USA taxation related works.
I have three types of taxations based on pay.
Less than $30/h the tax is 17.00%
$30 – $49.99/h the tax is 15.50%
$50 and Greater/h the tax is 14.85%
I would like to include all the above in one cell through if function or any suitable function.
Kindly give me a solution.
Best Regards,
Harish.
Hello,
I have a spreadsheet layout as follows:
Inv date
Hi I run a works lotto syndicate and I would like my winnings spreadsheet to add up the number of wins to total the amount in money ie Cell A1 is 1 win the total cell I1 is £3, the next week A1 is 2 wins so I1 = £6 and so on, is this possible?
Thank you
Michael
Hi all,
In the cells of column C I'd like to get the following numbers, based on the numbers in the cells of column B:
Bx = 0-14 -> Cx= 0; Bx = 15-30 -> Cx = 1; Bx = 30-60 -> Cx = 2; Bx > 60 -> Cx = 3
I used the following formula in the cells of column C:
=IF(B2>=60,3,IF=(B2>=30,2,IF=(B2>=15,1,0)))
However, Excel does not recognise the final 'B2' as a cell in the formula (e.g. it does not get coloured and it returns a message that there is an error in the formula).
Could you please tell me what I'm doing wrong?
Thanks in advance!
Hi
I have a problem in DVI/o, How I can remove this error from Excel. the formula is ('S'!C2-'Dry-Phase'!C2)/('Sat-Phase'!C2-'Dry-Phase'!C2. How I can use IF formula to eliminate this error and used o instead of it?
hey i need help for this, im making kind of a game in excel, like rock paper scissors and i need help.i have put in result if function and all is done but if i input something other than "scissors" "rock"or"paper" ,says false,so i put in if(...,"you win",c3"doesnt exist") /c3 is cell where i put user choice and i need help if it is possible to write whatever is written in user choice + "doesnt exist.".Example:
C D E
3 User choice Result
4 Dog Dog doesnt exit! /so c3+"doesnt exit"
if anyone knows please help, only that i need to finish
Hi, I've looked through and couldn't find the answer to my particular question.
I have four columns with 0/1/blank in them. Based on if they have 1 in it I'd like my new column to say International", Regional, National... HOWEVER, some countries have 1 in more than one column.
This is what I've got so far, which is OK if they have one answer, but how do I get to an answer like, "International, National"?
=IF(CB5=1,"International",IF(CC5=1,"Regional",IF(CD5=1,"National",IF(CE5=1,"Intermediate"))))
Many thanks in advance
J
i need the person to make 10.19, but if he does how can i get the IF function to work ?
i want to know the below formula :
if value is 10000>="200" and 10000< value "150"
kindly show the formula with"and"...
Hello
I Hope you can help me with this,
I want to create a formula where I can say this cell is = to a cell in another sheet, but if its blank, leave it blank, otherwise place the information
example
=IF(MASTER!D60,"","???") WHAT I WANT IS TO SAY THAT THIS CELL IS = TO THE OTHER CELL AND IF THE CELL IS BLANK, LEAVE IT BLANK DONT PLACE ANY NUMBER OR FORMULA OR ANYTHING
thank you in advance
if i got it right, i think it goes like this:
=if(D60="","",D60)
/this says if the cell d60 is empty(""),leave it empty(""),and if not input the text from it here.
Good Day
Thanks for the above answer
if i got it right, i think it goes like this:
=if(D60="","",D60)
/this says if the cell d60 is empty(""),leave it empty(""),and if not input the text from it here.
So I have a situation whereby I have 4 columns (A,B,C,D), I have information in either of the columns. I want the information to be populated in column E.
I found the above if function don't work for multiple column ranges or maybe I just get it wrong. Please assist
Need an IF THEN formula that covers multiple worksheets for a Quote template that users will be entering part numbers in to return certain prices.
SHEETS - 1.Intro - where promo code is selected from drop down cell,2.Pricing - where the user enters the part number and the desc & price auto-populates, 3. - Data Sheet)
I want the formula to look at a cell in the Intro Sheet and IF it contains data (a promo code) THEN return the price associated with the part number, If there the promo Code cell is empty then return the non-discounted price.
In my data sheet I have columns that contain part numbers and non-disc price and columns that have the promo code, part number and price associated with that code.
Easy right?
Basically If PROMO CODE is entered THEN apply promo pricing for material entered IF not THEN use normal pricing for material entered.
Hi ...
I'm a newbie with Excel
I would like to create a formula that "average the number of failed in a column ... In the top of my report I have 2 cells one for "%Failed" and the other for "%Success" ... my column is populated with "F" and "S".
So it's a "IF" follow by a "Count" or "Average" ?
Thanks
Hi
How would i create formula for when in a word 4th letter is "c" then true or false
How would I create a formula for getting a cell to populate a specific word related to a specific number? Example A1 = 01, I want B1 to always show FRONT, if A1 = 02, B1 = BACK
I have a list of varying numbers 50 numbers and each number is associated with a word.
Hi,
I hope you can help
I am using this formula, but the cell I am using it in shows £300 when C4 is 0.00.
When C4 is 0.00, I also want the cell to show as 0.00 until any information in entered, how do I incorporate this into the formula?
=IF(C4=300,0,C4))
Thanks in advance
Hi James,
Here you go: =IF(C4=0,0,C4)
I want a formula if the ans is NO in one column then 888 in the next coulum
Part 2
IF(C5>=300,0,C5))
James,
Our blog engine often mangles formulas with comparison operators, sorry for that. If my understanding is correct you want the formula to return 300-C5 if cell C5 is less than 300, otherwise return 0:
=IF(C5<300,300-C5,0)
If you are looking for something different, please express the conditions in words and we will try to work out a proper formula.
Sorry my formula didn't come up as I typed it, I'll try sending it in 2 parts
=IF(C5<300,300-C5,
Can you sum up the results of an IF statement if the result is a number? How?
hi, can you help me i have this if problem everytime i do more than 1 value i keep getting Error.. i have this this to appear on my excell
Yes=Approved
No=Location too far
?=Missing location
-and if possible to add more kindly add
e=Escalate
i=inappropriate content
p=no facebook photo
thanks for the future help.. more power.. :)
Hi Svetlana,
I would like to combine these two formulas in one cell. I'd like to see results that are a positive number, replace a negative number with a blank cell and replace errors with "no data". I can get them to work independently but not sure how to combine them. Any help you could give would be greatly appreciated.
=IF(ISERROR(NETWORKDAYS(J64,K64)-1),"no data",NETWORKDAYS(J64,K64)-1)
or
=IF((NETWORKDAYS(J68,K68)-1)<0,"",NETWORKDAYS(J68,K68)-1)
Thank you,Sarah
Hi ,
I want formula for below value 0, 1 & -1 as ok, Excess & short respectively.
What will be the formula.
0 ok
1 Excess
-1 Short
hello.....i have five different trucks for holding, each one has a serial of three numbers and each has different volume.. how can i use "if equation" or another one to gain more time inorder to not refill each time the repeated data for the driver..... i want when i type the driver name in cell A, i may have the truck number of this driver in cell B and the truck volume in cell C
I need a formula that will satisfy these conditions. The nominee must be male or female with more than 500 votes to qualify. My formula was wrong. Any suggestions?
Hi Johnny,
If you give more details about your data structure, I think we will figure out a proper formula.
i want to use a formula for good or bad
Examaple if i entre D6 value should have condition =< 12 is good and lower than 11.8 should be bad .
Please help in how to use formula
Hello Vishnu,
Here you go:
=IF(AND(D6<=12, D6>=11.8), "good", IF(D6<11.8, "bad", ""))
Hi Svetlana, This is Amit.
I want to check if numbers in first cell (3 numbers i.e.279) are matching with with second cell (8 numbers i.e. 27895613) and write result as "Match" or "Not Match" in third cell.
for example,
1. First cell - 123 Second cell 12435678 Match
2. First Cell - 231 Second cell 23457698 Not Match
Hi Amit,
Try the following formula:
=IF(A1=LEFT(B1,3)*1, "match", "not match")
It compares a 3-digit number in cell A1 with the first 3 digits of a bigger number in cell B1.
I need help creating a formula, please! I need column C to return today's date, only if column A and B both have a date in them. So if only one of the columns have a date in it then column C needs to remain blank. Column A already has an IF formula in it to populate it with today's date if another criteria is met. Hope there is someone who can help, as I am relatively new to formulas...Thanks!
Hi Alice,
If row 2 is the top-most row with data in your worksheet, you can enter the following formula in C2 and then copy it down to other cells in column C:
=IF(AND(A2<>"", B2<>""), TODAY(), "")
I was sure I had tried every variation possible, but clearly not! This has worked perfectly, thank you - I was about ready to scream :)
Hi Svetlana,
if have part of a If function =IF((AND(F33="Mild steel",F34="1mm")),"1.3".....
is it possible to change to vale 1.3 to a cell that has the value in it, for example..
=IF((AND(F33="Mild steel",F34="1mm")),"= F28"?
if not. is there any way the "value" could be what is written in a cell?
thank you in advance.
Stephen
Hi Stephen,
If my understanding of the task is correct, here’s the formula you are looking for:
=IF(AND(F33="Mild steel", F34="1mm"), F28, value_if_false)
Ecxel is now a piece of cake.
Give me a formula for:
If c4=10 there will be 2500 commision, or if c4=15 there will be 5000 commiosion
Hello ZAHIR,
Here you go:
=IF(C4=10, 25000, IF(C4=15, 5000, ""))
i have two sheets 1 & 2. I need to put the employee names on sheet 1 columns a1:a10 to sheet 2 column d...what should be my formula? i want to automatically put there instead of retyping or copying it
Hello!
Just enter the following formula into cell D1 on Sheet2 and then copy it down to other cells:
=Sheet1!A1
I have 13 columns and 26 rows. Rows list names of staff and columns list the months of the year. For each staff name listed on each row, when "yes" is entered into any one of the 12 columns (months of the year), I would like the other 11 empty columns to automatically turn to "NO". That way it prevents "yes" from being used more than once in that year.
I am trying to get an IF or or formula to work but having slight problems arise. My problem is that there are 36 state in india every state starting 2 tin no. are diffrece, i would like to ask that we want to formula as
example: 27=Maharashtra,01=jammu & kashmir, 02=Himachal pradesh, 03= Punjab ----------------------------------------------------------- etc.
i want to formula that ( if column no. is 27 that maharashtra than 01 jammu & kashmir as 36 state.
So pls. help us.
Hi kindly assist me with a syntax of If function that whent true types a value in a cell, ie, if a2=2, then it tyepes the value tyhat is in cell 3