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 26. Total comments: 4822
Hi. I want to tag a certain person as "regular" or "probationary" based on the XX number of their tenure derived from a formula and formatted to " X yr, X mo". My condition is that if the tenure is equal or greater than "0 yr, 6 mo" it should be tagged as regular. My problem is that it returns "probationary" to other values that start with "0 yr" even if the "X mo" is equal or greater than 6 mo.
Hope you could suggest a better formula. Thank you in advance.
Hello Mods!
The information presented to you is not enough to give you advice. What format is “X yr, X mo” written in? Text or date? Please specify what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
It’ll help me understand it better and find a solution for you. Thank you.
a. insert a formula using the IF function that tests whether the age of the invoice is greater than 30.
b. If the age of the invoice is greater than 30, subtract the due date from the current date.
c. If the age of the invoice is less than or equal to 30, display 0 to show that the invoice is not overdue.
Hello Adrienne!
If I understand your task correctly, the following formula should work for you:
=IF(TODAY()-A1>30,TODAY()-A1,0)
I hope it’ll be helpful.
Hi. I am generating a document that:
A1 B1 C1
A2 B2 C2
A3 B3 C3
A4 B4 C4
Column A has dates, Column B is auto populated from C1 on the today date, but at the end pf the day C1 resets and on next day B2 gets auto populated.
Can anyone help?
Hello Aurel!
I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail.
What does the phrase e mean "Column B is auto populated from C1 on the today date"?
Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
It’ll help me understand it better and find a solution for you. Thank you.
Hi i'm trying to put an IF statement into a cell to show the amount of a transaction under the right category heading. So far I have =IF(D10="Office Equip.",C10,"") so it inputs the value in C10 but I need one IF statement specifically to cover a range of columns from I:AH all with different headings. How would I type this IF formula?
Hello Kyle!
Formula IF with a lot of conditions will be very complicated and big. I recommend using VLOOKUP or INDEX + MATCH.
Seeking help of below mentioned conditions.
If I type greater than 10 but less than 16 questions in Phy/Chem/Maths in 30 minutes then I will be getting 5 points.
If I type greater than 5 but less than 10 questions in Phy/Chem/Maths in 20 minutes then I will be getting 3 points.
If I type greater than 2 but less than 5 questions in Phy/Chem/Maths in 10 minutes then I will be getting 0 points.
If I type greater than 25 but less than 35 questions in Bio/Eng in 1 Hr then I will be getting 5 points.
If I type greater than 15 but less than 25 questions in Bio/Eng in 1 Hr then I will be getting 3 points.
If I type greater than 5 but less than 10 questions in Bio/Eng in 1 Hr then I will be getting 1 points.
Sincere gratitude in advance. Thank You - Amit Sharma
Seeking help of below mentioned conditions.
If I type >10 but 5 but 2 but 25 but 15 but 5 but <10 questions in Bio/Eng in 1 Hr then I will be getting 1 points.
Sincere gratitude in advance. Thank You - Amit Sharma
I am not able to figure out while applying multiple If conditions. Seeking you help.
Conditions-1 :
If I type >10 but 5 but 2 but 25 but 15 but 5 but <10 questions in Biology/English/ in 1 Hr then I will be getting 1 points.
Sincere gratitude in advance.
Thank you
Amit Sharma
Hello there!
Here is what I am trying to do:
If text in Column D (from Workbook 1) matches text in Column E (from Workbook 2) then enter text from Column B (from Workbook 2) in Column F in Workbook 1.
I cannot figure out how to use the vlookup function for this exercise...
Help would be very much appreciated... thanks a lot.
Hello!
In your case, you cannot use the VLOOKUP function. When a search occurs in one data range, and you need to return data from another range, use the INDEX + MATCH functions. Read more about it here.
If you use Office365, pay attention to the XLOOKUP function
i need a formula that i want to equal first column numbers to second column texts for example firs colum 25 34 56 second column love like hate 25=love 34=like 56=hate and excel learn these equalities and i want to use them after for ex. text sheet 25034 25789 25678 34567 34897 56987 excel and i use left operation and next column 25 25 34 34 56(think that it is a column) and excel write ney column love love love like like hate
if i use matlab it gets easier or struggle or should i use only excel
please teach this trick
(sorry for my bad english)
Hello!
If I understand your task correctly, the following formula should work for you
=VLOOKUP(--LEFT(C1,2),A1:B3,2,0)
Read more about function VLOOKUP in this article
Good day,
I need to calculate data into a worksheet from specific Columns on a Mastersheet where it links back to specific Unit (Column B:B), amount of Sessions (Column D:D), but then also just for specific month (Column I:I).
I could only manage thus far: =SUMIF(Master!B:B,CEN!B6,Master!D:D), but then how do I just get it to consider data for a specific month (Column I:I)?
Hello Mariska!
If you use several criteria, it is better to use the SUMIFS function. Read the detailed instructions at this link.
=IF(B2="",A1,N(A1)+1)
I am using this formulae, but I didnt understand why series in A showing multiple times
for B merged cells? How to fix this formulae? I don't want series in A to show multiple times.
Hello!
I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find. Give an example of the source data and the expected result.
It’ll help me understand it better and find a solution for you. Thank you.
See this image: https://i.imgur.com/Ewr1SXU.jpg
I don't want 66 so many times with this formulae.
Hello!
You have 3 options:
1. Cancel the merging of cells in column B
2. Merge the cells in column A in the same way as in column B
3. Remove formulas from cells A83: A88
Dear Alexander.
You've been more than kind, to help me before, and if it's not too much to ask, I would like to ask for your guidance ones again. I'm having a total of 30 cells (F10, F39, F68, F97, F126 and so forth) that contains the same dropbox of 8 different payment possibilities (PAGO, CARTÃO, CREDITO, DEBITO, DINHEIRO, TRANSFERENCIA, BOLETO, ASSINATURA). I'm trying to generate a formula that shows if one of more of the following 4 payment options (cartão, credito, debito, dinheiro) are listed in one or more of the 30 F-cells. For instance, if F10=BOLETO, F39="", F68=CARTÃO, F97=DINHEIRO, F126=CARTÃO... the formula would generate: "CARTÃO, DINHEIRO". Do you think you can help me with this? Sincere gratitude in advance!! Thank you!! Ronni
Hello Ronni!
Excel formula cannot work with non-contiguous cells. So you can use something like this formula
=CONCAT(IF(INDEX(COUNTIF($G$10:$G$40,$H$10:$H$13),1)>0,"debito, ",""), IF(INDEX(COUNTIF($G$10:$G$40,$H$10:$H$13),2)>0,"credito, ",""), IF(INDEX(COUNTIF($G$10:$G$40,$H$10:$H$13),3)>0,"dinheiro, ",""), IF(INDEX(COUNTIF($G$10:$G$40,$H$10:$H$13),4)>0,"cartão",""))
Where
formula in G10 is =F10
formula in G11 is =F39 ....... etc
in H10 written "debito"
in H11 written "credito" ... etc
I hope this will help, otherwise please do not hesitate to contact me anytime.
Hi!
I need a help with formula: IF A2 is 1, then 1, if A2 is 3 or 2, then 0.
I have data in a 16R x 1C format. As per the formula given by me, only 1 cell will display the value in number based on some calculation and rest of the rows will display "Not Applicable". Cell which shows the number may vary depending upon the inputs, but rest 13 will show "Not Applicable". I want to report the number to another cell, Whether it appears on 1st row, or 2nd row or 12th row etc. only the number must be displayed on the reporting cell. Can you please help me to do the same?
I NEED A FORMULA THAT IF= E:E = COMPLETED, THEN A1-(B1,C1,D1), E:E MEAN WHOLE COLUMN
I would like to build a formula for calculating loan payable. Interest chargeable is 10% of the principal but if no payment is done by 10th of the following month, the interest gets compounded, meaning, interest is calculated on top of the added interest to the principal. Is this doable?
i just want a formula where, there is a number like 364 ,now i want to put formula to find if last 2 digit is square of some number or not , if yes thn give value true(like in this case in 364 -----64 is square of 8) nd if not no thn give value false
example 2 :- 382 in this 82 is not a square of any number therefore valuse come should be false.
Hello!
If I understand your task correctly, the following formula should work for you:
=IF(SQRT(--(RIGHT(A1,2)))/INT(SQRT(--(RIGHT(A1,2))))=1,TRUE,FALSE)
I hope it’ll be helpful.
I need an equation that does two things. I need it to count a range of cells that has any text value. Also if the count is greater than 5 I need the blank to say "no more off" if the count is less than 5 then cell is blank. This is one of the equations I tried in cell k4 I typed. =count(L6:L22,"*"),IF(k4>5,"no more off","") i tried several different variations of this concept.
Hi, i am trying for if function when the one of cell value is True i need list of drop down values when False it should be Null
sir Please help me to findout the solution IN EXCEL
if i write AAA1,AAA2....AAA999 and if IT IS MORE THAN AAA999 THEN NEXT VALUE WILL BE AUTOMATICALLY AAB000
AND THEN AAB000 TO AAB999 AND THEN AACOOO..
Column A = Date 30-June-2020, Column B = Date 30-Sep-2020 (*Overdue morethan 2 months)
How to condition formatting highlight the cell in Column B in red color
Hello!
If I understand your task correctly, use this formula in a conditional formatting rule:
=IF(EDATE(A1,2) < B1,TRUE,FALSE)
Hope this is what you need.
=if ((a1="g"),1,or(a1="mg"),1,0)
i want 1 if a1=g and a1=mg also if a1=kg then 0 and so on.
= IF(OR(D32="g",D32="mg"),1,"")
got it Thanks
Hi Alexander,
I have a column with some digital values. I am writing an IF statement on the neighbouring column to add paranthesis around the number in the previous column.
Ex. =IF(D10>0,[D10],0)
Hoping that if D10 ha a value 5, the IF statement returns [5] adding the square parenthesis. But it does not. How do I fix this? Thanks!
Hello!
If I understand your task correctly, the following formula should work for you:
=IF(D10>0,"["&D10&"]",0)
But at the same time, the number will be converted to text.
You can also use a custom format without formulas.
Please go to Format Cells, choose Number -> Custom Format and set
\[#\];-#,##0;0
I hope this will help
I need help to excel sheet formats can works auto print with data find as per order...
Example :
first name ()
Second name (). Etc.
I am working same method in word the mailmerge using for auto data print.
Give me solution for excel. How can use to autoprint in excel.
Hi sir,
Please advice me the formula
I have three ccolumn in excel sheet - Today date ,City and Departure date.for today date i used the formula =today().but i need the formula in departure date i person is coming from same city then today date = departure date and if outside from my city then today date less one day i.e yesterday date
Hello!
Yesterday's date can be calculated using a simple formula
=TODAY()-1
But to give more detailed advice, I do not have the necessary information. Please describe your problem in more detail. Include an example of the source data and the result you want to get. It’ll help me understand your request better and find a solution for you. Thank you.
I have a Date in B6, I want it to show a date in M6 thats 90 days out and if there is words in B6 regarding status "In installation or In permitting" I want it to be blank or show 0. Is that possible?
Hello Charles!
Do you want the formula, text and date to be in B6 at the same time? It's impossible. If I misunderstood you, explain your problem in more detail.
Hi,
Please assist as my formula does not seem to be working. It gives wrong answers even for correct checks.
Formula currently in use: =IF(A2=B2, "Wrongly Charged", "OK")
The idea is to confirm if NUMBERS in A2 MATCH THOSE IN B2. IF SO THEN ANSWER SHOULD BE "OK"ELSE "WRONGLY CHARGED".
Formula returns "WRONGLY CHARGED" even for numbers that are the same/equal.
Hello!
I do not see your data, so I can only guess. Possible reasons why the equality condition for numbers in the IF formula does not work:
1. Some of the numbers are saved as text. This is indicated by a green triangle in the upper left corner of the cell and left alignment.
2. Numbers do not match in decimal places, which are hidden by number formatting.
i am calculating the rent payment alert, where in sheet where rent is 2000
month sr due date due amount paid balance
1 1-04-2020 2000 1000 1000
2 1-05-2020 2000 3000 0
so i need logic for the due amount once the date of due smaller than todays date
Hello!
I hope you have studied the recommendations in the above tutorial. Please specify what you were trying to find, what formula you used and what problem or error occurred. What do your numbers mean? It’ll help me understand the problem you faced better and help you.
I have 3 columns, one column showing actual costs, one row showing the estimated cost and 3rd column showing my forecasted costs. I want to write an if statement for the forecasted column that will default to the value in the estimated column if our actual costs are zero. However if we do have actual costs I want it to reflect those costs. For example
Actual Estimated Forecast
12 5 12
0 10 10
3 0 3
Hello Candyce!
If I understand your task correctly, the following formula should work for you:
=IF(A1=0,B1,A1)
I hope this will help
I am working on a spreadsheet relating to points (for employees). Each employees late and/or sick is recorded and they are given .5 or 1 point depending on late/sick call. After a year the employees point is removed. To keep the spreadsheet updated, there are formulas in place to change the cell to red once a year has passed. We recently made a change that the employees late will now be removed after 6 months. I need a formula that after 6 months late calls (column E), date is highlighted (column C). For the late point to be removed.
Columns are as stated below.
B - Employee ; C - Date ; D - Status ; E - Actual Leave (sick, late etc.) ; F - Points ; G - Total points
Thank you in advance for your help.
Hello!
To highlight a cell with a date that happened more than 6 months ago, use the conditional formatting formula
=EDATE(TODAY(),-6) > C1
I hope this will help
Thank you for the reply, Alex. I appreciate your guidance.
This is a running spreadsheet that is tracked daily, with different conditional formatting rules, making it easier for dates to be tracked and points to be removed/added.
I was hoping there was a formula to only track lates from column E, within a 6 month time frame for dates from column C. Would this need to be an IF formula inputted as a rule?
I am hoping this makes sense.
Thanks again for your help.
Hello!
Your problem is not entirely clear to me. If you want to compare dates with columns C and E, then you can use conditional formatting as a rule
=EDATE(C1,6) > E1
This condition is TRUE if between dates C1 and E1 is less than 6 months
Column C are specific dates the employee called in. Column E is what the employee called in (late, sick, FMLA etc.). I need only the lates (from column E), the dates (from column C) within 6 months to be highlighted in order to remove points the employee has accumulated.
Again, your help is very much appreciated. Thank you for your time.
Hello!
Each time you describe your problem in a different way.
What does "I need only the lates (from column E)" mean?
What do you mean by "lates"?
What is wrong in the formula
=EDATE(TODAY(),-6) > C1 ???
What result do you get? What result would you like to get?
Do you need dates for the last 6 months (you wrote "within 6 months") or older than 6 months (you wrote "after 6 months")?
I apologize for being so frustrating/confusing. Nothing is wrong with =EDATE(TODAY(),-6) > C1, except it is highlighting ALL dates from column C with 6 months or older. The formula works (and thank you for that), it's just missing one part I need.
I only need dates highlighted from column C that are labeled "LATE" in column E. Column E has no dates, only words with the type of leave the employee was marked that particular date, e.g LATE, Sick, FMLA(family and medical leave act), LOA(leave of absence), NCNS(no call no show).
Thank for for your continued help (because clearly I am no excel wizard).
Dear Alex Hi,
Small Query what to write today Date in cell:(A1) if i type "OK" in Cell:(B1).
please note Date Should not be got changed as the day change.
Thanks
KP
Hi,
I have a spreadsheet which has one column of company names, and one column of numbers. There is a table at the bottom, what I need is for one line in the table to add all of the number cells for each company name? They are in date order so the company names are not in alphabetical order.
How can I do this?
Thanks,
Hello Jack!
You can select values by condition using the VLOOKUP function or using the Excel filter
Hi,
If my company is giving me salary on every mid month and month end basis (Eg. 15 and 30 or 31 (depend on month end date) / for Feb month 28 or 29).every fortnight i received the 10000 dollar.But suppose i am leaving the company on 12-06-2020 then how much amount i will get?
I need advance formula where we can drag the formula and take it out the amount for other employee details also.
E.g.
Leaving date Amt
12-06-2020 10000
26-02-2020 10000
please let me know if additinal details required.
Hello Sera!
If I understand your task correctly, the following formula should work for you:
=IF(DAY(A11) < = 15,DAY(A11)/15,(DAY(A11)-(DAY(EOMONTH(A11,0))-15)) / (DAY(EOMONTH(A11,0))-15))*10000
I hope it’ll be helpful.
I hope you're still able to respond to this thread! I'm creating a bonus tracker and I'm wanting Excel to add $50 whenever someone achieves $500 over their goal. For example, the goal is $1,000 and someone achieves $1,500, then they would get an additional $50 payout. Another example would be the goal is $1,000 and someone achieves $2,000 then they would get an additional $100 in payout. Thank you!
Hello~
I have a birth date in one cell (example 7/22/15), and I need to another cell to auto populate the age in years based on the date 9/1/20. The value would be 4, but what would be a formula to populate that automatically?
Hello Kathy!
To calculate age, the IF function is not needed. I recommend to study these examples and guidelines.
In addition, I need the number to come out to a whole number that isn't rounded up.
Hi,
i need help with a formula
If column "M" is less than £3.50 then it needs to say £3.50 and if its higher than £3.50 it needs to return the value stated in column "M"
=IF(M5<3.49,"£3.50","M5")
My formula is this so far but the higher value is saying M5 instead of the values higher than £3.50
Hello Matt!
Please try the following formula:
=IF(M5 < 3.49,"£3.50",M5)
IF MY CELL CONTAINED #N/A FROM A VLOOKUP VALUE HOW TO PUT 0
Use the IFERROR function to handle errors. Read more here.
if have in one cell 196.513K, then i want another cell 196.513/1000. Can it possible?
Good day,
I am trying to create an 'If' formula for tasks that picks up a range from another sheet and returns the result on a summary tab.I am not sure if 'IF' is the correct formula as I can't get it to work.
If C38:C42 (on the detailed tab) status is completed then return the text 'Completed, if FALSE then return 'To Complete' on the Summary tab.
I have tried =IF(Revals!C38:C39="Complete","Completed","To Complete") but it didn't work.
Hello Nisha!
If I understand your task correctly, the following formula IF should work for you:
=IF(IFERROR(MATCH("Complete",C38:C39,0) > 0,0),"Completed","To Complete")
I hope this will help, otherwise please do not hesitate to contact me anytime.
Thanks Alexander. I tried it but when I change the status it still returns the same value as if completed. Meaning, if I then went to the detailed tab and changed the cells one to complete and the other to to be completed, it still gives me a result on the summary page that the tasks have been completed when it hasn't.
On the positive at least it is returning a value, i could not get it to even do that :-)
Thanks
Hello!
I expected that you pay attention to the fact that my formula does not have such cell references as yours. I do not have your workbook, so the links may not be the same. I think you just copied the formula and now want it to work? I have given you a sample. Use your cell references in it.
Hi Alexander, yes I changed to my cell references to pick up from the separate tab. However with me putting one as Complete and the rest as To complete, it still returned a value of Completed
Hello!
I wrote this formula based on the description you provided in your original comment. But now it’s clear that you didn’t say everything. How many cells in your range? 2 or more? There were 2 of them in your formula. But now, according to your words, I see that this is not so. Do you need at least 1 match or matches in all cells? The formula you wrote speaks of one coincidence. Now is this not so? Please note that if you’d provided me with the precise and detailed description of your task from the very beginning, I’d have created a different formula that would have worked for your case.
Sure, thank you for you help.
It will be ranges of cells in one column. In this particular example, there are 5 rows in the column. The user is required to change the status to either Completed or Not completed. This is on the detailed tab. There are about 5 different headings with a range of tasks in each one. So I wanted to create a summary sheet that will then Look at each area and then return a result. If all tasks are not completed, even if only one tassks is the summary sheet should say not completed for that particular area. Eg below
Sales
Column B Column C
Row 23 Payroll Reval Not Completed
Row 24 Orders Reval Not Completed
Row 25 Bank Reval Completed
Row 26 Tax Reval Not Completed
Row 27 Interco Reval Completed
I hope this clarifies a bit
Could some one help, please? I am trying to analyse the sales data for a new housing development. I have set up a table with my raw data for the 126 properties, with the following columns:
A = Street number
B = Street address
C = developer’s plot number
D = developer’s house type name (in text)
E = developer’s house type code number (mix of numbers and letters)
F = number of bedrooms the house has
G = whether the house is a flat/terraced/semi-detached/detached
H = size of house (ft2)
I = sale price
J = date of sale
K = sale price/ft2
I am trying to consolidate the raw data into a second table in the same worksheet so that I can calculate the average selling price for the 22 different house types. I find that if I sort the raw data table on house type name to group each house type together and then use the AVERAGE function In the consolidated table, when the raw data is then resorted on a different parameter (say street name) the data pull through for the average is the new cell content rather than the original cell content (ie the cell reference remains the same rather than changing to follow the original data). I have tried to set up a logic test (=IF(D5:D130)=D135,AVERAGE(I5:I130), ) where the range D5:D130 is the range of house type names in the raw data table, D135 is the specific house type name in the consolidated data table, and I5:I130 is the selling price in the raw data table. All I get is an error, either #VALUE! or #NAME! if I try fiddling with the logic test set up. What am I doing wrong?! Can anyone help, please?
Hello Andrew!
Try using the AVERAGEIF function, which calculates the average value based on the condition. Read this guide.
Thank you. It worked! Much appreciated. Gold star!
Hi!
I've been using the IF function with this formula:
=IF(C26-5*$G$25<0,"N/A","YES")
Now that equation is putting "YES" in the correct cells where I want them to. Now I want to change "YES" with a new condition that actually follows a recursive formula; I want to copy the column E7:E18 to another table I'm working on, but only start copying if that cell no longer satisfy the first condition I set up. Is there a way to create the formula such that if the previous IF function is false, I will still start at E7? Is there another way to do this?
I look forward to your response :D
Hello Hannah!
I’m sorry but your task is not entirely clear to me. What does E7: E18 have to do with your formula? What does "start at E7" mean? What condition do you want to include in your formula instead of “Yes”? Please describe your problem in more detail. It’ll help me understand it better and find a solution for you. Thank you.
Hi,
How do I, if condition met, the cell equals to the value of another cell?
For example;
Cell C4 is empty. If the formula in cell U2 generate a '1', the value of C4 will automatically be equal to the value stated in cell R2.
By the way, the value in cell R2 is 'A,B,C,D'.
Please advise and thank you.
Hello Nicholas!
If I understand your task correctly, the following formula should work for you:
=IF(U2=1,R2,"")
I hope it’ll be helpful.
Hi,
I could use some help please.
I have 3 variables that depend on the last letter of the main word and I would like to separate them as follows:
XXXXXXA Yesterday
XXXXXXD, XXXXXXXE, XXXXXXF Today
XXXXXXK, XXXXXXL, XXXXXXM, XXXXXXN Tomorrow
If try IF, OR, ISNUMBER SEARCH AND FIND but I can’t figure it out.
So I just want it to write ‘Yesterday’ if last letter A, ‘Today’ if D,E or F and ‘Tomorrow’ if K, L, M or N as last letter.
Thanks
Hello Matea!
If I understand your task correctly, the following IF formula with nested IF conditions should work for you:
=IF(SUM(--(RIGHT(N1,1)={"K","L","M","N"}))>=1,"Tomorrow", IF(SUM(--(RIGHT(N1,1)={"D","E","F"}))>=1,"Today", IF(RIGHT(N1,1)="A","Yesterday","")))
I hope this will help
Dear Alexander,
You've been so kind to help me with the following formula: =IF(OR(B35"";C35"";D35"");CONCATENATE(B35+C35+D35;"x ";C28);"")
Would you be so kind to also guide me on how to include a second IF-formula (just with following cells B56, C56 and D56 with the name from cell C49? Preferably separated with a comma between the formulas, so the output would look like e.g.: 5x Ronni, 2x Alexander
I've tried with following =IF(OR(B35"";C35"";D35"");CONCATENATE(B35+C35+D35;"x ";C28);IF(OR(B56"";C56"";D56"");CONCATENATE(B56+C56+D56;"x ";C49);"")) but I can't get it to work.
Once again, thank you very much for your kind help!!
Ronni
Hello Ronni!
You just need to add another formula with the condition
=IF(OR(B13<>"",C13<>"",D13<>""), CONCATENATE(B13+C13+D13,"x ",C7),"") & ", " & IF(OR(B35<>"",C35<>"",D35<>""), CONCATENATE(B35+C35+D35,"x ",C28),"")
I hope it’ll be helpful.
Dear Alexander! Thank you very much for your answer and time. I'm not really sure why, but the output of the cell ends up only calling the first IF formula (C7 without C28). I've checked all the cells, made sure that they aren't empty. If I change the order of the two formulas, it calls (C28 without C7). And I'm not getting any error messages on the formula. Do you have any idea why that can be? Once again, thank you for your time!!
=IF(OR(B13"",C13"",D13""), CONCATENATE(B13+C13+D13,"x ",C7),"") & ", " & IF(OR(B35"",C35"",D35""), CONCATENATE(B35+C35+D35,"x ",C28),"")
Hello Ronni!
In my Excel workbook, the formula works. There are no ideas other than copy error.
Try a different version of this formula, where instead of the & operator, the CONCATENATE function is used
=CONCATENATE(IF(OR(B13<>"",C13<>"",D13<>""), CONCATENATE(B13+C13+D13,"x ",C7),""),", ",IF(OR(B35<>"",C35<>"",D35<>""), CONCATENATE(B35+C35+D35,"x ",C28),""))
I have a data from an ERP system which gives the amount with a symbol suffix 'Dr' for debit balance, and a 'Cr' for a credit balance. I want to capture the debit balances as a positive value and the credits with a negative value. Please help
Hello Thomas!
I do not know how your values are written. You did not say anything about this. The IF function will not help here. But I think that you’ll find this formula useful
=IFERROR(VALUE(SUBSTITUTE(A20,"Dr","")), -VALUE(SUBSTITUTE(A20,"Cr","")))
I hope this will help, otherwise please do not hesitate to contact me anytime.
Hi,
My scenario is the following: if a date is more than 3 years old then Good...if is less than 3 years Not Good. For example if 04/17/2016 is more than 3 years old from 01/01/2020. Thanks.
Hello Chris!
To calculate the difference between dates, use the DATEDIF function. I recommend this article. Use DATEDIF with the Y parameter as a condition in the IF function.
I hope this will help, otherwise please do not hesitate to contact me anytime.
I believe I found the error in the formula. The parentheses were not placed correctly..... Correct formula: IF (A1>0,TEXT(B1-A1,"[mmmm]")," ")
I have three columns. Columns A and B contain date & time information and column C contains the difference (in minutes) between A and B. The formula being used in column C is TEXT(B2-A2), "[mm]". Currently if nothing is in column A or B the formula in column C shows 00. I would like for it to show blanks.
Please help me understand why I am unable to use the following formula so as to not see 00 in column C:
IF A2>0, TEXT(B2-A2), "[mm]", " ". Explanation: If columns A and B are not populated, column C should appear as blank and not contain 00.
Are you able to create an IF then statement in excel and embed another function formula?
Example:
Column A2 contains a start date and time: 5/15/20 14:15.
Column B2 contains an end date and time: 5/16/20 08:09.
Column C2 contains a formula to caculate the duration between columns A and B in minutes: TEXT(B2-A2), "[mm]".
I am looking for a formula where blanks will appear in column C2 if column A2 is not yet populated. I want to include the TEXT formula throughout column C, in order to auto populate the column C once columns A and B have data. Currently, using the formula TEXT(B2-A2), "[mm]" yields 00 in column C2 if A2 is blank.
I tried the following formula, but cannot get it to work: If A2>0, TEXT(B2-A2,"[mm]", " " Explanation: If nothing is in column A, column C should be blank (i.e. not show 00). Thanks in advance for your assistance.
Hello Joe!
Use the IF function with two conditions
=IF(AND(A2<>"",B2<>""), TEXT(B2-A2,"[mm]")," ")
If there is anything else I can help you with, please let me know.
Hi. I am trying to create a formula that says:
If (a1 =1 then c1 = 50) ( a1= 2 then c1 = 60) (a1= 3 then c1 = 70) (a1 = 4 then c3 = 10)
Thanking you in advance.
Hello Jeff!
A formula can only set a value in the cell in which it is written. The formula in C1 cannot change cell C3.Therefore, I assume that C3 is a mistake. Change C3 to C1. The formula in C1 is
=IFERROR(CHOOSE(A1,50,60,70,10),"")
Or use the If function
=IF(A1=1,50,IF(A1=2,60,IF(A1=3,70, IF(A1=4,10, "") ) ) )