Get to know Google Sheets IF function better with this tutorial: when it's used, how it works and how it contributes to a much simpler data processing. Formula examples are included! Continue reading
by Alexander Trifuntov, updated on
Get to know Google Sheets IF function better with this tutorial: when it's used, how it works and how it contributes to a much simpler data processing. Formula examples are included! Continue reading
Comments page 6. Total comments: 553
In cell B2, I am looking for the following Values:
A,A1,A2,B,B1,B2. If any of the values are TRUE I wish to populate K2 with the letter M and if none of the values are found (False), I wish to populate K2 with F (The populated values stand for Male and Female.)
I'm having problems with my IF formula. Please help.
Thanks
Here you can you OR as well, like I described above. In you case K2 formula will be: =IF(OR(B2="A", B2="A1", B2="A2", B2="B", B2="B2"), "M","F")
I am trying to do a nested IF statement for the following scenario:
In Row 1, Col B:E, I have letters A and C alternating in some of the cells but not all
In Col 1, Row 2:10, I have locations either Austin or Chicago (a location in every cell)
Inside the matrix (B2:E10) I want to put in a formula to mark an X in each cell IF it meets either of these conditions, otherwise leave it blank:
IF($B$2="A" AND A1="Austin", "X", IF($B$2="C" AND A1="Chicago, "X", "")
This formula is not working though, how do I make a new one that will?
Thanks
You can't use AND or OR like you did. They have to have arguments, for example: AND(A2 = "foo", A3 = "bar")
Thus, according to their syntax, your formula will be the following:
=IF(AND($B$2="A", A1="Austin"), "X", IF(AND($B$2="C", A1="Chicago"), "Y",""))
Hi There,
Trying to use an IF formula to show that should a cell have a greater amount than another cell a different cell would show 'yes' and would show 'no' if it was not a greater amount.
For context this is for a stock check.
Thanks,
Hi Ray,
This part of the article explains how to create a formula based on a condition like the one you described.
Hello! I need help creating a formula for a spreadsheet. If a cell contains a certain range of numbers, how do I make the cell to the right of it, auto-fill in with a designated percentage.
For example:
If cell M4, contains any number between 0.00-79.99%, then cell N4 auto fills in with 3%
If cell M4, contains any number between 90.00-99.99%, then cell N4 auto fills in with 5%
And so on, based on the following chart.
% to Quota Bonus Rate
0.00%-79.99% 3.00%
90.00%-99.99% 5.00%
100.00%-109.99% 7.00%
110.00%(+) 9.00%
Appreciate the help!
Taylor, you need to add an extra IF as a logical expression to your formula, please have a look:
=IF(M4>0,IF(M4<79.99%, 3%,IF(M4<99.99%, 5%, IF(M4<109.99%,7%,9%))),"")
In this case Google Sheets checks if M4 is more than 0; then it checks whether M4 is less than 79.99 and puts 3% if it is, or keeps checking further. Please take a look at the part "IF in combination with other functions" in this article.
Is it possible to copy selective data from one tab of a sheet to another tab. I have data in column A through Y. And, I want to copy only the name (column A and url column (column V) only if the url exist for that name, not if the url column is empty.
Any help would be appreciated.
You need the VLOOKUP function. You can also try the add-on Merge Sheets, it solves your case perfectly without writing any formulas! You'll find the links below:
https://chrome.google.com/webstore/detail/merge-sheets/gdmgbiccnalapanbededmeiadjfbfhkl?hl
https://www.ablebits.com/office-addins-blog/vlookup-google-sheets-example/
I am using this IF formula to multiply if the number is greater or = too but it doesn't work past the 1st IF. All are multiplied by 1.15 no matter the number value of the number. Please help!
=if(isblank(K2),"",if(K2>=45,K2*1.15,if(K2>=40,K2*1.2,if(K2>=35,K2*1.25,if(K2>=30,K2*1.5,if(K2>=25,K2*1.75,if(K2>=20,K2*2,if(K2>=15,K2*3,if(K2>=10,K2*4,if(K2>=1,K2*6,0))))))))))
Your formula works great. I've just checked and if K2=40, the result is 48; if it equals 1, then the result will show 6.
I am trying to create a payment list that includes a drop down menu on every row (PAID & NOT PAID). Another column is how much each person owes, I7:I105 is the payment status, F7:F105 is how much is owed, F107 is the total money owed altogether. So far ive created the drop down menu on each row, totalled all the money into F107 and when the payment status is set to 'PAID' the whole row will change to red with strike through text.
What i want is when the payment status is set to 'PAID' for the whole row to turn red with strikethrough text and the money a person has paid to be deducted from the total money owed in F107. HELP!!!!
You need another function COUNTIF. You'll find it here: https://www.ablebits.com/office-addins-blog/countif-google-sheets/
I need a formula that copies data from several cells on one sheet to identical cells on another sheet, IF a value is entered into a cell on one of the sheets.
if the value in F4 is "x" Then A4, B4, C4, D4, E4 and T4 need to be copied to (new sheet B3,3,D3,F3,G3,H3)
any help I'd appreciate.
Hello,
If I understand your task correctly, please enter the following formulas into the corresponding cells on the new sheet:
Cell B3
=IF($F$4="x",Sheet2!A4,"")
Cell C3
=IF($F$4="x",Sheet2!B4,"")
Cell D3
=IF($F$4="x",Sheet2!C4,"")
Cell F3
=IF($F$4="x",Sheet2!D4,"")
Cell G3
=IF($F$4="x",Sheet2!E4,"")
Cell H3
=IF($F$4="x",Sheet2!T4,"")
Hope it will help you.
Hi, I am trying to populate a cell with a certain value (price) if the previous according to different values in another cell, example: if the day is sunday or monday the price would be 20euro, if is monday would be 15 euro... how shall I type the function? Thank you
Hello,
If I understand your task correctly, please try the following formula:
=IFERROR(IFS(WEEKDAY(A1,1)=1,"20euro",WEEKDAY(A1,1)=2,"15euro"),"")
where cell A1 contains a date value, e. g. 1/30/2018
Hope it will help you.
How do I insert one of several different formulas into a given cell, based on a one-time test?
For example, if C10:C15 hold 'frozen' (non-recalculating) random numbers, I want B10,say, to hold =E2*3 if C10 is less than 0.5, otherwise B10 should hold =0.
How do I go about this?
Hello,
If I understand your task correctly, please try the following formula:
=IF(C10<0.5,E2*3,0)
Hope this will help you!
I am trying to write some if and statements .. So I have a number crossword puzzle, if the students get the write combination I want it to say congrats. I am setting for smaller statements - two cells at a time, if I have to .. But I have something wrong.
=if(AND($A$3="5",$A$5="1"),"so far so good", " ")
Any help would be appreciated.
Hello, Rachel,
Please try the following formula:
=IF(AND($A$3=5,$A$5=1),"so far so good", " ")
Hope it will help you.
How would I create a custom formula in Google Sheets which would do the following:
If Column A, B, & C contains a date then change column X to YES
Cheers legend!!
Hi there
Can you please let me know what the proper equation would be for assigning a specific value to a cell? For example, if a cell is populated (with text, doesn't matter what the text is) and I want to assign the value of 1.25 in the cell directly to the right of the populated cell, how would I type that out in an equation? IF C2 = filled, then 1.25 (or something similar).
Thank you!
If I get it right you'd put the formula in D2, where you will populate 1.25, if C2 has a whatever value. This if it can be whatever value, also a number, ecc... you can use the following formula:
=IF(C2"",1.25,"Field was empty")
you can replace "Field was empty with whatever you'd wish to do in case C2 was not populated.
I have 3 columns with three different values, I want a formula which can say Good or bad based on some If conditions.
Basically what I want is
A) The difference in values between Col C and Col A > 12
AND
B) Value in col C is > 160
If the above conditions match I want the fourth column to say "Bad" If it fails to match I want it to say "Good"
This is the formula I have used. =IF(AND(C1-A1 > "12",C1 > "160"),"bad","good") But irrespective I get Good all the time.
Can you help what is that I am doing wrong here in the formula?
Hi, Chandra,
Your formula is written incorrectly, it should be like:
=IF(AND((C1-A1)>12,C1>160),"bad","good")
You don't need to enclose numbers in double quotes and you need brackets for C1-A1. Please read this article about common mistakes made when writing the formulas.
Hope this solves your task.