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 37. Total comments: 4822
Hi,
I want to add up the main totals of sheets 1, 2 and 3 in an excel document, to separate excel sheet.
How the document works: This BOQ is used to add up codes/qty/price/etc. When sheet 1 is full and sheet 2 and / or 3 is used the total of the previous sheet shows “see next sheet“ in the total block and the main total only reflects on the last sheet used.
If for example only sheet 1 is used the total only shows on that sheet it doesn’t show on the other sheets that are not used.
My question: How can I add all three sheet totals without the words “see next sheet” interfering and I also need to add it in a way that it doesn’t count a sheet total twice as it is already calculated on the last sheet used.
Maybe if the formula sees the word “see next page” it can count the total of the next sheet until it finds the sheet with an actual total amount.
Please could you help. Thank you in advance.
I am trying to do the following:
Row 1 options: No, Yes-2nd, Yes 3rd. (Drop down options)
Row two needs to equal:
No= $100
Yes, 2nd= $50
Yes, 3rd= $30.
I can figure it out to be No= $100, but then if I put Yes, 2nd or Yes, 3rd it equals $50.
Help please!!
Is it possible to change the options to Yes1 or Yes2? This might be an easier way of going about this.
i want month wise count the consignment(s) by formula
Eg...
The Month is April
Assign April = "04"
Now count Numbers until the month is not changed from 04 to 05
for example
1/4/19 = 1
5/4/19 = 2
10/4/19 = 3
11/4/19 = 4
but..
01/5/19 = 1
2/5/19 = 2
so, please give me the right formula for the same
To begin with, you need to make sure the data is sorted by date. This is important for the below steps to work.
Now let us assume you have the date values from A1 to A6. Column B will have the following values:
B1=1
B2=IF(MONTH(A2)MONTH(A1), 1, B1+1)
For the rest of the B columns, you can copy paste the B2(You can also drag). So the formula for B3 will be like =IF(MONTH(A3)MONTH(A2), 1, B2+1) and B4 will be =IF(MONTH(A4)MONTH(A3), 1, B3+1)
Hope this helps
Dear All Expert,
I have a number in table range as show below and how to make the tolerance formula.
Reference target tolerance is 5%
Reference target value is Last day will be Beginning for next week
Week 2 reference target is last day output at week 1, 190. Week 2 are trigger as 1 because week 2 contain the value below and above on 5% tolerance for 190. Minimum is 180, maximum is 199.
Reference target for week 3 is the last day of week 2, 200. Minimum 5% tolerance for 200 is 190 and maximum 5 % is 210. Week 3 not have any output below 190 or more than 210, so result will show 0.
Reference target for week 4 are the ending day at week 3, 199 output as a reference for week 4 tolerance. Meaning that minimum and maximum 5% of 199 is 189 and 209. So if week 4 reach the output below than 189 or more than 209 it will trigger as 1. Result for week 4 is 1 because 27 Aug reach the bottleneck of below the minimum output of 189.
Week Date Output Trigger
4 31 Aug 206 1
4 30 Aug 201
4 29 Aug 196
4 28 Aug 206
4 27 Aug 187
-----------------------------------------------------------------------
3 26 Aug 199 0
3 25 Aug 195
3 24 Aug 202
3 23 Aug 208
3 22 Aug 209
----------------------------------------------------------------
2 21 Aug 200
2 20 Aug 130
2 19 Aug 160
2 18 Aug 145
2 17 Aug 170
-------------------------------------------------------------
1 16 Aug 190
1 15 Aug 150
Appreciate for your kind helpful.
Dear Sir,
how to EQUAL name with number like a(mdg 0001 + mdg 0002 = mdg 0003)
Hello I'm using this function below but I keep getting a name response instead of what I am looking for. Is there something wrong with the syntax?
=IF(AND(C3=WHITE, D3=Y), [WhiteY], [FalseWhite])
Thanks
Use this instead
=IF(AND(C3="WHITE", D3="Y"), C3&D3, "Falsewhite")
Note: When you are comparing text, the double quotes sign is required.
I'm trying to put together a formula that will look at a cell and a date and then search two columns to see if those two entries exist and to return a True/False response.
=IF(AND(A2=D2,B2=E2),"TRUE","FALSE")
Hi
I have a 2013 Excel spreadsheet based on Wool Bales. I need to find out the Average cost per lot number (Most of these lots have multiple lines).
I also need to find out the total count of wool bales that have a physical bin (location) number. These are in two separate columns, and some of the locations are blank cells.
Can anyone help?
Hi all
I just want to ask,it is possible to use If function if there is a gap in the given range?
You can use countif function. The following line looks at blank values("") in the Range A1 to B10, and returns TRUE if there is a blank cell.
=COUNTIF(A1:B10,"")>0
Madam
With A column time to B column time if 1 hour late meens c column need to show as "Late" how formala. Pls
Assuming B1 is always greater than equal to A1, you can use the following command
=IF(TEXT(B1-A1,"h")"0","Late","")
Hi. Can you please help me. I already have the IF formula where i want to generate a specific value from a column if between date range.
Example:
Column A1 Start Date, Column B1 End Date, Column C1 Headcount
Data in 2nd row: Headcount of 6 from Jan. 1, 2014 up to Jan.31, 2015
FOrmula in Column D1
=IF(AND(D1>A2, D1<B2), C2, 0)
The formula is working fine but he problem is when here is blank or no date in End date column. I would like to make use of one formula only that will work whether the End date has data or not.
Your help is very much appreciated. Thanks
Hi,
How to handle situation:
I have I3 value 153022, and I need that if char 1 value is bigger than 2 (or I could use also equal to 7) then it gives to cell K3 value KO and otherwise leave empty. I used =IF(LEFT(I3;1)=7;"K0";" ") but it returns no value to anywhere.
Please advise - is this even possible to do that?
=IF(LEFT(I3,1)=7,"K0","")
Just change the semicolon ";" to a comma ",".
Upon further review, you may need to add quotations to the 7.
=IF(LEFT(I3,1)="7","K0","")
or
=IF(LEFT(I3,1)>1,"K0","")
I'm not sure why it works with > without quotations but, does not with =.
Sir,
I have 2 data 1 is feed back taken list another one is feedback to be taken list.
i want to fill the remark as "old customer" and "new customer" with 2 data
A B C D
Deductible Nil Discount KWD 1.500/- 0 1.5
Deductible Nil Discount Nil. 0 0 0
Deductible Nil Discount KWD 0.750/- 0 0.75
Deductible Nil Discount KWD 1.500/- 0 1.5
Deductible Nil Discount KWD 1.250/- 0 1.25
HI FRIENDS, ASSUME ABOVE MENTION IS TABLE AND I WANT TO KNOW C COLUMN NUMBERS ARE PLACED IN THE A COLUMN. IF THERE IS ANY EQUATION IS AVAILABLE
NOTE: A COLUMN CONTAIN TEXTS AND NUMBERS.
M8 me value chahiya
j8 me zero value he to M8 me E8 ka data aana chahi a
You can use a simple IF statement for this
=IF(J8="", E8, "")
or
=IF(J8=0, E8, "")
=IF(LEFT(A3,1)=6,Y,"") not working????????
=IF(LEFT(A3,1)="6","Y","")
Seems you have to use "" when using the = on the Left function.
Still a problem to paste the formula.
In other words, I wish to insert categories in a column refering to the precedent showing the number of habitants per municipality. To analyse thousands of lines, my categories are for a number of habitants between:
0 and 999: A
1000 and 2499: B
2500 and 4999: C
5000 and 9999: D
10 000 and 19 999: E
20 000 and 500 000: F
So sorry that the copy/paste is not working for the formula... Thank you for your help
Hi Dalia,
I seem to have the same problem and for your formula, you have to use If(and(
Ex. if(and(C1147>=10000,C1147<19999),"E",[similar formula with updated range]
=IF(C1147=1000,C1147=2500,C1147=5000,C1147=10000,C1147=20000,C1147<500000),"F",))))))
=IF(C1147=1000,C1147=2500,C1147=5000,C1147=10000,C1147=20000,C1147<500000),"F",))))))
Something is wrong with the original, it didn't post the whole formula.
Something is wrong with the these forums as it doesn't seem to let me post the actual formula.
=IF(C1147=1000,C1147=2500,C1147=5000,C1147=10000,C1147=20000,C1147<500000),"F",))))))
Me again!
I don't understand that each time that I paste my formula, part of it disappear... Hoping that the categories (letters from A to F) will show after each category this time. Another try :
=IF(AND(C1147>=0, C1147=1000, C1147=2500, C1147=5000, C1147=10000, C1147=20000, C1147<=500000),"F"
Sorry and thanks
Sorry, my formula should be read as :
=IF(AND(C1147>=0, C1147=1000, C1147=2500, C1147=5000, C1147=10000, C1147=20000, C1147<=500000),"F"
Thank you
Hello,
I am trying to put categories (A to F) into my excel sheets (thousands of lines!) to be able to analyse depending on the number of habitants (between a number & another) by municipality for a research, but my formula isn't working. Please, could I ask you to correct me? My formula is:
=IF(AND(C1147>=0, C1147=1000, C1147=2500, C1147=5000, C1147=10000, C1147=20000, C1147<=500000),"F"
Thank you for your attention and have a great day/evening
Hi,
This is the criteria :
If assets age is..., then charge over the cost:
=1 year = 75%
>=2 years = 65%
>=3 years = 55%
>=4 years = 45%
>=5 years = 35%
>=6 years = 25%
>=7 years = 20%
Lets say :
A (List of Asset) = Motor (A1); Car (A2); Truck (A3)
B (List of Cost) = RM10,000 (B1); RM50,000 (B2); RM80,000 (B3)
C (List of Purchase Date) = 1/1/2015 (C1); 1/1/2016 (C2); 1/1/2017 (C3)
D (Disposal Date) = 1/1/2019 (D1; D2; D3)
E (Results) = what is the formula for this?
Good day,
I need to write a formula to say that if 15:10:06 it greater than 15:00:00 the make it 15:00:00 and if the value is less then leave it as is,
eg. 15:10:06 to 15:00:00
eg. 14:45:51 leave as is
Hi, I am trying to read excel cells, and want to write an if statement which recognizes whether the cell contains a numerical value or text (#N/A,#DIV/0!) and return specific values in return -
1 - if the cell contains numeric value - 4500, if statement should return numeric value 4500
2 - only if the cell contains this specific text - "#N/A", if statement should return text "NoASP"
3 - only if the cell contains this specific text - "#DIV/0!", if statement should return text "MissingASP"
I tried various formulas, for example - =IF(EXACT(A3,"#N/A"), "NoASP", A3), but this works only if I add in the cell containing the values #N/A with apostrophe or single quote like this ('#N/A), Changing the cell format to text didn't work for me.
Can anyone please help.
I need a formula where I can take todays date in one cell and in another cell if it is not three days after todays date an error pops up says invalid entry.
Hi,
I am trying to use a IF command, ie., =IF(B4=1, "10:00", IF(B4=2, "8:00", IF(B4=3, "8:27","0:00"))). Though i am getting the the result correct, i am not able to do the calculation on the hours (10:00) which is showing as text. How can i get the above result converted in hours.
santhosh
I'm trying to take multiple text in different cells and want them to shows as 1 specific text.
I need to convert Time To Employee shift in excel
Ex. 06:00 To 07:00 A shift
14:00 to 22:00 B shift
22:00 to 06:00 C Shift
In this middle time suppose to some employee will come 06:015 and leave the company 14:15 so i need to count Ashift .
Any Body Help
=if(60=>60)
Hi,
Please help on following
if column A is equal to 0 than multiply column B1 X column C1
date format having in a specific cell, it will indicate 0. If date not mention, the result will be 1. how can we get result like this using if function.
can anyone pls reply asap
I am looking for the formula for the following:
-if cell A1 has "Always" in it, I want cell B1 to reflect 2
-if cell A1 has "Sometimes" in it, I want cell B1 to reflect 1
-if cell A1 has "Never" in it, I want cell B1 to reflect 0
Please help!
Hi there!
I am trying to write an IF statement. If Override Date is blank, then use the value in Creation Date to populate Actual Date. If Override Date is not blank, then use the value in Override Date to populate Actual Date. Here's what I have thus far: IF({Override Date}="",{Creation Date},{Actual Date},IF{Override Date}"",{Override Date},{Actual Date})
Thoughts?
Hi
I'm hoping you can help, I cannot upload data as it is all sensitive personal info, but I need to cross reference hours lost due to mental health and none of my attempts are providing satisfactory results. I have several worksheets in my spreadsheet breaking down cases by region e.g. 1,2,3 etc. I have each case laid out per employee within their region tab and a column lists their hours with another denoting "yes" or "no" for mental health. What I need to do is pick up anything 'Yes' for mental health with the number in their hours so I can work out how many hours we lost per week of absence. They are set up like "Region 1!Q:Q" for yes/no and "Region 1!G:G" for the hours.
Is this possible? Thanks.
need help
Column 1 Column 2 Points
OS and OS =5
OS and VS =3.5
VS and OS =3.5
VS and VS =2
what formula will i use?
=IF(B5B4, " ", "NO CHARGE") This formula works perfectly however, my problem is that if the B5 cell and the B4 cell are empty, it will also say "NO CHARGE" which is not what i want. Instead I want the formula to roughly be able to do this:
"If B5 is equal to B4 (the cell directly above) the current cell will execute 'NO CHARGE', otherwise it will execute nothing. But if both cells are empty, it will also execute nothing, instead of still executing 'NO CHARGE' because both cells are technically still equal to each other because they are empty."
Could you please help me with a formula that solves this issue?
I wrote this formula =($K4+$J4)/2 and is giving me #value, but when I put value in the cell feeding either of K4 or J4 it come out well
Dear Genius,
I need your help for Drivers Salary calculation for distance base as below.
Km 1 to 10 5 US$
Km 11 to 20 8 US$
Km 21 to 30 10 US$
Km 31 to 40 12 US$
Km 41 to 50 15 US$
Km 51 to 60 20 US$
Km 61 to 70 25 US$
Please do favor
=IF(D5=“FALSE”,EOMONTH(F5,0),DATE(N57),0)
***Cell no (N57) = write an another date
Pls above conditions are not properly plz send me correct conditions
This is excellent blog with very good information. Thank You.
I am trying to do a function which will help me with this issue:
If text in cell A matches a text in a cell in a list in column B then import from the next cell in the list C (same as if you were to use Sumif but with text only!)
I want to add today's date to a cell (F9) if cell F12 is populated. If it is blank, I want F9 to stay blank. Not working with what I've tried. Please help. thanks
=IF(F9=" ",(" "),(DATE(TODAY(),TODAY(),1))) - is not correct. Giving me NUM#
Hi Team,
If "formula" Can we use with particular cell in name sppose "punit12&₹" This name i have english alphabets,numbers with special character so usse "if" Formula is "count" Other "No" In No candition I am ussing name with hindi character or chainse character other etc character
Pls do the needful
Regards
Punit
+91 7065751520
Hi
Please assist with formula: If date cell in sheet 1 is the same date from a column of dates in sheet 2, copy data in the respective row in sheet 2
Thank you
Beth
Our appraisal office is looking to create an excel spreadsheet to manage the amount of assignments we can accept. I was hoping to create an IF function for a date only if we type "YES" in the column. I have tried but was not successful.
Ex. Date Given to us 10/08/19 ---> Inspected? YES ---> Due Date would be the IF function 10/08/19+2 business days, if successful it should automatically input 10/10/19.
Is this possible?
I want actual value(obtained Data) in a cell but if value become 0 so want to my cell show <10
so what i do
How i shall formulate if PASS,FAIL by making statements from text such as P/A which indicates as present and absent
Hi,
I read through the comments but not sure if a similar type of question asked.
What function is best used if I have a list of items which will be answered Yes/No. I want a cell to state yes if all the cells are ticked as yes, if not all of them is yes (even if only one is no) that cell should say No.
Currently I am trying the IF function but just struggling to get it working.
Thanks for your assistance.
Hi
I need a formula if cell A2 = any cell in column c it will copy text contained cell d2
Thanks
Can you help me with this formula:
i have 3 coloums A,B,C
A. Sl No
B. Name
C Code
in this if i enter name in B Cell is it possible to pic automatically code in C Cell. please help me.
Hello, I am trying to use IF to help auto populate a sheet. I have 12 sheets, what I want to do is put a sheet name in the reference cell and have a cell from that sheet displayed. Example in A1 sheet name. B1 'sheet name'!B3.
Two thigs i have tryed
=IF(OR(A1=421,”’421’!BE”,””,OR(A1=424,”’424’!B3,””,OR( A1=429,”’429’!B3”,””))))
=IF(OR(A1=421,A1=424,A1=429),”’A1’!B3”,””)