If someone asks you what Excel function you use most often, what would your answer be? In most cases, it's the Excel IF function. A regular If formula is very straightforward and easy to write. But what if your data requires more elaborate logical tests with multiple conditions? Continue reading
Comments page 3. Total comments: 650
I have a nested If function formula with vlookups that is returning a false value.
In short, I have multiple bank accounts, where is the final 4 numbers is the bank account = a set number, I need the vlookup to draw information from another worksheet.
=IF(X3="","",IF(X3="2121",IFERROR(VLOOKUP(N3,'Monthly CR Data'!T:AA,8,FALSE),IF(X3=2089,VLOOKUP(N3,'Monthly CR Data'!U:AA,7,FALSE),"Not Reconciled"))))
Problem is, it works for the '2121' account, but the '2089' account pulls back a false value, rather than doing the VLOOKUP in the cells specified.
Any help would be greatly appreciated
Hi!
I can't check the formula that contains unique references to your workbook worksheets. Try adding quotes in the second IF condition. X3="2089"
hi! i have am trying to capture multiplying by the higher value.
i have, minimum order Quantity (MOQ) in A2, and i have the customers required amount in B2.
and i have unit price in C2
so when MOQ is higher, multiply MOQ x unit price, but when customer requirement is higher, multiply requirement by unit price.
Hi!
Please read the above article carefully.
in this formula we able to merge 2 column value how can we merge multiple value of column B formula is =IF(A3A2,B3,B3 &","&B2)
Thanks for your support in advance.
Hi!
Add the values you want to merge to the formula. For example
=IF(A3>A2,B3,B3 &","&B2&","&B4)
If this is not what you wanted, please describe the problem in more detail.
Good day!
Status cell to be changed by checking 5 different cells:
My status is in cell B11 and the cells to check values are C11, D11, E11, F11, G11.
if any one of the cells have "No" or "Active" then the status should be "In-Progress". if all the cells have "N/A" then status should be "N/A". if all the cells have "Yes" then status should be "Complete".
How to check multiple cells in one time and update the status? Kindly help. Thanks for the help!
Used below formula but feels like too long!
=IF(C11="NO","IN-PROGRESS",IF(C11="Active","IN-PROGRESS",IF(D11="NO","IN-PROGRESS",IF(D11="Active","IN-PROGRESS",IF(E11="NO","IN-PROGRESS",IF(E11="Active","IN-PROGRESS",IF(F11="NO","IN-PROGRESS",IF(F11="Active","IN-PROGRESS",IF(G11="NO","IN-PROGRESS",IF(G11="Active","IN-PROGRESS",IF(H11="NO","IN-PROGRESS",IF(H11="Active","IN-PROGRESS",IF(I11="NO","IN-PROGRESS",IF(I11="Active","IN-PROGRESS",IF(J11="Active","IN-PROGRESS",IF(J11="NO","IN-PROGRESS","COMPLETE"))))))))))))))))
Good day!
Status cell to be changed by checking 5 different cells:
My status is in cell B11 and the cells to check values are C11, D11, E11, F11, G11.
if any one of the cells have "No" then the status should be "In-Progress". if all the cells have "N/A" then status should be "N/A". if all the cells have "Yes" then status should be "Complete".
How to check multiple cells in one time and update the status? Kindly help. Thanks for the help!
Hi!
To check all values, use the SUM function
=IF(SUM(--(C11:G11="No")),"No",IF(SUM(--(C11:G11="Yes"))=5,"Complete",IF(SUM(--(C11:G11="N/A"))=5,"N/A","")))
Also follow the instructions from the article above.
Could you maybe help me with a formula for this problem?
I have a spreadsheet with a lot of data, and I will like for you to help me with he below
I have over 6K members that were prescribed medications during years 2021 and 2022.
I want to know which members had medicine prescribed during 2021 only, 2022 only or both (2021 & 2022). I want to have a formula that displays "2021", "2022" or "BOTH"
I have the below columns among all the data:
Prescribed date (using format YYY-MM-DD)
Prescribed Year (YYYY)
Person Id (Unique ID numbers) - This column has all ID numbers for members that received medications, meaning that is possible one member ID could be in this column multiple times if this person got medications more than once. Example below
ID Fill Date Year What I'm looking for
12345 2022-05-05 2022 BOTH
12345 2021-01-03 2021 BOTH
01123 2022-03-09 2022 2022
05486 2021-01-25 2021 2021
23546 2021-05-30 2021 2021
01123 2022-04-09 2022 2022
Hello!
If I understand your task correctly, the following tutorial should help: How to VLOOKUP multiple values in Excel with criteria.
Use the UNIQUE function to get only unique values.
=UNIQUE(IFERROR(INDEX($A$2:$A$7,SMALL(IF(2022=$C$2:$C$7,ROW($C$2:$C$7)-1,""),ROW($C$2:$C$7)-1)),""))
[ ID ] [Fill Date] [Year] [What I'm looking for]
12345 2022-05-05 2022 BOTH
12345 2021-01-03 2021 BOTH
01123 2022-03-09 2022 2022
05486 2021-01-25 2021 2021
23546 2021-05-30 2021 2021
01123 2022-04-09 2022 2022
=IFS(I7="AC","CEEW4",I7="WM","CEEW3",I7="REF","CEEW2",I7="","")
this similar formula I need in Excel
I can figure out why the formula is breaking. The data columns it's pulling from are all validation lists.
=UPPER("1 x 1 "&[@[Year & Quarter]]&" "&C6&" "&IF([@Site]="Facebook","FB",IF([@Site]="twitter","TW",IF([@Site]="TikTok", "TikTok",IF([@Site]="Reddit","Reddit", IF([@Site]="snapchat","Snapchat",IF([@Site]="Pinterest","Pinterest","No Social Platform"))))))&" "&[@[Audience Type Category
(Automated when Salesforce Audience ID is present)])"&[@[Analytics Report Placement Name
(Freehand/Use "NA" if blank)]&" "&[@[Opt Descriptor
(Freehand/Use "NA" if blank)])
I can't check the formula that contains unique references to your workbook worksheets, sorry.
Hi Alexander,
could you maybe help me with a formula for this problem?
I want to check how many deliveries were made on time for 3 separate categories. There are deliveries that are emergency , priority and regular.
Emergency deliveries should be delivered within a day so x<=1
Priority deliveries should be delivered within 2 days so y<=2
Regular deliveries should be delivered within 7 days so y<=7
If it took more then the days mentioned above, delivery is considered late.
My data set looks like the following:
x - 1
y - 5
z - 6
z - 0
z - 2
y - 0
x - 1
x - 0
x - 0
How can I combine this question into one formula?
Hello!
To count values by conditions, use the COUNTIFS function.
For example,
=COUNTIFS(A1:A10,"x",B1:B10,"=0")
Hi Alexander, I think it is not exactly what I am looking for.
I managed to make this formula for 1 category (emergency deliveries) =IF(AND(A2="Emergency",B2<=1),"1","0"). In this way I am asking excel to show me emergency deliveries that are delivered either on time (1) or too late (0) which in this case it is on time if it is delivered within a day. How can I add the other two categories? Priority and regular. Priority should be delivered within 2 days and Regular within 7 days. I thought I need to and two more if functions but if I do so I get #value
Hi!
In the second question, you are using very different data than before. I don't understand what result you want to get.
Assume this is the data set:
Emergency -3 days
Priority - 7 days
Regular - 8 days
Priority - 9 days
Emergency - 0 days
Regular - 1 day
Regular - 10 days
Emergency - 1 day
Emergency deliveries should be delivered within a day so Emergency <=1
Priority deliveries should be delivered within 2 days so Priority <=2
Regular deliveries should be delivered within 7 days so Regular <=7
I want excel to tell me which orders were delivered on time and which too late based on their urgency and the above mentioned conditions. I was able to make this formula: =IF(AND(A2="Emergency",B2<=1),"1","0") but I don't know how to add the other delivery types.
Your help is much appreciated
Hello!
If I understand your task correctly, you can use IF OR formula:
=IF(OR(AND(A2="Emergency",B2<=1), AND(A2="Priority",B2<=2), AND(A2="Regular",B2<=7)),"1","0")
Look for the example formulas here: Excel IF OR statement with formula examples.
Alexander,
Thank you so much for your help. it is indeed what I needed!
HI,
i wan to solve below table
Site id status Final status
BHAIYATHAN 5|1 UP Up If first and last up then final status all column up
BHAIYATHAN 5|2 Down Up
BHAIYATHAN 5|3 Down Up
BHAIYATHAN 5|4 Down Up
BHAIYATHAN 5|5 Down Up
BHAIYATHAN 5|6 Down Up
BHAIYATHAN 5|7 Down Up
BHAIYATHAN 5|8 Down Up
BHAIYATHAN 5|9 Down Up
BHAIYATHAN 5|10 UP Up
Site id status Final status
BHAIYATHAN 5|1 Down Down If status Down Then Final Status is actul of status
BHAIYATHAN 5|2 Down Down
BHAIYATHAN 5|3 Down Down
BHAIYATHAN 5|4 Down Down
BHAIYATHAN 5|5 Down Down
BHAIYATHAN 5|6 Down Down
BHAIYATHAN 5|7 Down Down
BHAIYATHAN 5|8 Down Down
BHAIYATHAN 5|9 Down Down
BHAIYATHAN 5|10 UP Up
Site id status Final status
BHAIYATHAN 5|1 Up UP
BHAIYATHAN 5|2 Down Down
BHAIYATHAN 5|3 Down Down
BHAIYATHAN 5|4 Down Down
BHAIYATHAN 5|5 UP UP
BHAIYATHAN 5|6 Down Down
BHAIYATHAN 5|7 Down Down
BHAIYATHAN 5|8 Down Down
BHAIYATHAN 5|9 Down Down
BHAIYATHAN 5|10 Down Down If last down Then All final status Actual of status
Sorry, it's not quite clear what you are trying to achieve.
Hi
I want to write an IF that can be used for several ranges of Excel, for example:
scores result criteria
78 scores result
34 <30 Fail
49 30-50 III Div
10 50-70 II Div
89 70-90 I Div
28 90+ Incredible
80
77
64
98
thanks pirooz
Hi Alexander,
Please help me with my following problem.
Cell A2 = 300
B2 = 100
C2 = 500
=IF(A2>B2, A2,B2, IF A2>C2, A2,C2, IF C2>B2, C2,B2)))
The true result will only show the first and the second IF.
Thank you in advance.
Hi!
Based on your description, it is hard to completely understand your task. I don't know what result you want to get. However, I’ll try to guess and offer you the following formula:
=IF(A2>B2,A2,IF(A2>C2,A2,IF(C2>B2,C2,B2)))
Please re-check the article above since it covers your task.
Hi Alexander,
Thank you for the reply. Sorry if I didn't explain the problem well, but you got I what I mean. :)
I tried your formula, however, it only shows that C2 is greater than A2 if B2 is greater than A2. But if B2 is lower that A2, then the answer in the formula is A2 is greater than C2 & B2 which should be C2 is greater than A2 of B2.
Sorry again to bother you but hopefully you can help me with this coz I'm not really good in excel.
Thank you so much!
Hi!
I just corrected the syntax errors in your formula. But I still don't understand what result you want to get. All detailed instructions are in the article above. Or describe in detail the desired result.
Hello I have been stuck on this IF statement for three days now and I keep getting invalid or the pound sign, as well as just the equation I'm inputting to still be there with nothing being done. This one is kind of weird to do, for me: I have to make a nest statement for when I can go to the beach the set up is below. I can only go on Friday, the weather has to be nice and I have to have at least $500. That's the only numeric number but I set it up different ways so many times that I've lost sight of what and how to use the and, can't... =IF(A4<=Friday?, "Yes", IF(A4=,Bad Weather, "No", IF(A4<=$500, "Can't Go"))) A4 is the first cell with Friday in it. Can you tell me what I'm doing wrong? I've watched a couple of youtube vids, and articles but the formulas I try yield the same result: Nothing. Please and thank you for your time.
Friday with an drop down arrow
Friday
Anyday
Sunny and warm
Sunny and warm
Nasty
$500
Hi!
Try to use these recommendations: IF AND in Excel: nested formula, multiple statements.
Hello
I cannot figure out how to fix this IF AND NESTED formula. Please help.
=IF(AND(R2>=19.01, R2=21.01, R2<=23, 70, IF(R2<=23.01, 75, " " )))
Hi!
I can suggest the following formula -
=IF(AND(R2>=19.01,R2=21.01,R2<=23),70,IF(R2<=23.01,75," "))
For more information, please visit: IF AND in Excel: nested formula, multiple statements, and more.
Hello again.
There was a copy and paste error in my above question. This is the actual formula that I need help with.
=IF(AND(R2>=19.01, R2=21.01, R2<=23, 70, IF(R2<23.01, 75, "")))
Hi,
Can you help me with this calculation?
I want to calculate the commission (3%,5%,7% etc) based on the total sales in location i16
=IF(i162000=4000,"i16"/100*5,IF(i16>4000=6000,"i16"/100*7)))
Thanks in advance
Hi!
See Example 2 in the article above. This should solve your task.
Hi so this is my current formula
=IF(OR([@[FULL NAME]]="Player 1",[@[FULL NAME]]="Player 2",[@[FULL NAME]]="Player 3",[@[FULL NAME]]="Player 4",[@[FULL NAME]]="Player 5",[@[FULL NAME]]="Player 6", [@[FULL NAME]]="Player 7", [@[FULL NAME]]="Player 8"),"DEF")
I'm wanting to add two other IF OR onto the formula, so if player 9, player 10, player 11 then itll be MID and then for players 12, 13, 14 itll be 'ATT'.
Does anyone know how I could add these on?
Thanks in advance!
Hello!
Extract digits from text using the RIGHT function. Convert them to a number, as described in this guide.
Use a nested IF function to get the result you want.
=IF(--RIGHT(A1,2)>11,"ATT", IF(--RIGHT(A1,2)>8,"MID","DEF"))
Good morning - I am looking for a simplified formula to calculate all of the possible outcomes between 4 categories (East, Midwest, South, and West) and their 3 potential ratings (Low, Medium, High). The current formula - which has accounted for all possible outcomes - has produced 81 levels of nesting (3 x 3 x 3 x 3 = 81), which obviously is too large and cannot be entered. I was wondering if using IFS instead of nested IFs might work? Any suggestions would be tremendously appreciated - thanks!
Hello!
Create a table where categories are written in rows, and ratings are written in columns. Write down all possible options in the table. Then choose the desired option using two-way lookup.
Look for the example formulas here: Excel INDEX MATCH MATCH and other formulas for two-way lookup.
I hope it’ll be helpful.
Hi,
What can be the formula for this?
Since I have 140k line items, how can I group the Order No. based on the Items?
Let's say classification is not available and I want to group the order no. with multiple types of goods as "Mixed Items".
Order No. Item Classification
1 Fish Mixed Items
1 Veggies Mixed Items
1 Fruits Mixed Items
1 Rice Mixed Items
2 Fish Seafoods Only
2 Fish Seafoods Only
2 Fish Seafoods Only
3 Bread Breads Only
3 Bread Breads Only
Thanks in advance!
Hello!
If I understand your task correctly, try the following formula:
=IF(COUNTA(UNIQUE(FILTER($B$1:$B$100,$A$1:$A$100=A1)))=1,"Mixed items","")
or
=IF(IFERROR(ROWS(UNIQUE(FILTER(B1:B100,$A$1:$A$100=A1))), 0)=1,"Mixed items","")
For more information, please visit: Count unique values with criteria.
I have a column of cells with drop-down options of "Complete", "In Progress", "Not Started", and "Backlog." J6 - J25 specifically.
I have a cell that I am attempting to display the overall progress as a percentage (located at H3).
How do I get a selection of "Complete" to contribute to the percentage as a 100% value, the "In Progress" to contribute to the percentage as a 50% value and all others 0.
For example: J6-8 says, "Complete" "Complete" "Complete"... then H3 will say "100%"
or "Complete", "Not Started" will have H3 showing "50%"
Hi!
Your description of the problem and the example do not match, but the formula could be something like this -
=IF(SUM(--(J6:J8="Complete"))=3,100%,IF(SUM(--(J6:J8="In progress"))=3,50%,""))
About using double dash (--) with boolean values learn more in example 3 in the article - SUMPRODUCT and SUMIFS in Excel. I hope my advice will help you solve your task.
Hi
=IF($G60,$G$4,)&" "&IF($H60,$H$4,)&" "&IF($I60,$I$4,)
G6, H6, I6 = Sales
G4, H4, I4 = Place
Is there any other formula which I can use in place of above formula.
Thanks
Hi!
I don't quite understand what you want to do with this formula.
Pay attention to the correct use of the IF function.
Hi Alex
I have one column (E) where i have the percentage calculated.
Then i have a Target Points Colums (B) with numbers 1-5
now i need to set a condition in COlumn F, where if the average is 100% and above i need to add 1 to the value in column B
100%-110% plus 1 90%-100% minus 1
110%-120% plus 2 80%-90% minus 2
120%-130% plus 3 70%-80% minus 3
130%-140% plus 4 60%-70% minus 4
140%-150% plus 5 50%-60& minus 5
Thanks
A
Hi!
For a single condition, use the normal IF function:
=IF(E1>100%,B1+1,B1)
Hello, please help with any formula suggestions for what I'm trying to do -
For each dollar of new income (as shown in cell D13) between $140 and $220, calculate an abatement of .20cents per dollar, and deduct this from current income (found in D7)....
Then for each dollar of new income (D13) above $220, calculate an abatement of .50cents per dollar, and also deduct this from current income (found in D7).
My version of excel is older; can't use SUMIFS.
(sorry to hijack this thread, can't find where to start a new comment)
Hello!
To calculate interval values, use the MIN function and MAX function.
=MAX(D13-220,0)*0.5+MIN(MAX(D13-140,0),80)*0.2+MIN(D13,140)
Hope this is what you need.
Would like some advice about a nested IF formula. The formula I have written is: =IF(L2>0,L2,IF(K2>0,K2,IF(J2>0,J2,IF(I2>0,I2,G2))))
with the intention that the latest filled column from I to L should be copied over to a new column and if there's nothing in I-L then column G should be copied instead. The formula works if column L is filled in and SOMETIMES if there's only column G to copy but not for any other scenarios.
Example:
G= 7
I = 9
J= 11
K = Blank
L = Blank
M with formula should show 11
I can't work out what I've done wrong!
Hello!
Use the INDEX+MATCH functions to find the last non-empty cell in a range. The following tutorial should help: How to use INDEX and MATCH in Excel.
Please try the following formula -
=INDEX(I1:L1,,MATCH(1E+20,I1:L1,1))
=IFERROR(INDEX(I1:L1,,MATCH(1E+20,I1:L1,1)),G1)
I hope I answered your question.
Yes!!! It worked. Thank you. :)
Hi,
I want to sort company revenue with the following conditions:
$250M
How do I turn this into a nested IF formula? Or do I use another type of formula?
Hi!
If you want to show values by condition, use the FILTER function or the Excel Filter tool.
If this is not what you wanted, please describe the problem in more detail.
Sorry the conditions didn't load up completely. The conditions are:
$250M
Sorry, just ignore this
On the second thought, can you please evaluate if this formula is correct? Thank you!
IF(Z3 < 100,000.00, "250,000,000.00, " > 250M))))))))))
Hi!
If you have a problem with formulas, I recommend reading this guide: Excel formulas not working, not updating, not calculating: fixes & solutions.
If you fix errors in your formula:
=IF(Z3 < 100000,250000000," > 250M")
Thank you for linking the guide. Bless you!
Please support me for following XL formula-
IF 10000, he is ultra-poor
IF 10001 to 15000, he is poor
IF 15001 to 25000, he is middle class
Thank you
Hi!
Carefully read the first paragraph of this article above. There is an answer to your question.
I am trying to do a nested if, and it is telling me I have too many arguments. In cell w2, i am inputting the word "yes", "no", or "probation". I wrote this formula. I am not sure where I have an error, Please help.
=if(w2, "yes", "APR Complete",
IF(w2, "no", "APR Needed",
IF(w2, "probation", "Not Applicable")))
Hi!
You can learn more about IF function syntax in Excel in this article on our blog.
You can use this formula:
=IF(W2="yes", "APR Complete",
IF(W2="no", "APR Needed",
IF(W2="probation", "Not Applicable")))
Hi
Thanks for an excellent article.
I have successfully managed to get the correct results for the first 3 conditions below. However with regards to IF(AD2>-10,"Big Loss", if the number is greater than -10, it still returns loss instead of "Big Loss"
What can I do to correct this in the formula below.
=IF(AD2>=10,"Big Profit",IF(AD2>0,"Profit",IF(AD2<=0,"Loss",IF(AD2<=-10,"Big Loss"))))
Many thanks,
Radley
Hello!
Swap last two conditions in nested IF function:
=IF(A2>=10,"Big Profit",IF(A2>0,"Profit",IF(A2<=-10,"Big Loss",IF(A2<=0,"Loss"))))
Hope this is what you need.
Hi,
How to get the formula for the following scenarios
Qty Value Rate Rate 2 Required
18,508 25,96,571 140 - 140
21,716 14,15,208 65 225 65
Hi!
What do you want to calculate exactly? Your question is not entirely clear, please specify.
One number is inputted into column A in either A1, A2 or A3 and then that number is also displayed in column B in either B 1, B2 or B3. But which cell it shows in column B should depend on both the value of the number and the cell in column A it was entered into.
If A1 is lower than 0 then the number is displayed in B3.
If A1 is 0-100 then the number is displayed in B1.
If A1 is over 100 then the number is displayed in B2.
If A2 is lower than 0 then the number is displayed in B1.
If A2 is 0-100 then the number is displayed in B2.
If A2 is over 100 then the number is displayed in B3.
If A3 is lower than 0 then the number is displayed in B2.
If A3 is 0-100 then the number is displayed in B3.
If A3 is over 100 then the number is displayed in B1.
Any idea on how to program this in excel?
Hello!
You can use multiple conditions in a nested IF formula:
=IF(AND(A1>0,A1<100),A1,IF(A2<0,A2,IF(A3>100,A3,"")))
This is the formula for cell B1.
I also suggest carefully reading the recommendations in the article above.
Hi I need to calculate the following
If car is 1200cc or lower the and the following will apply and if the car is 1200 of higher the following will apply. Any help would be appreciated
1200cc or lower
up to 1500KM .3795 per KM
1501 to 14000KM .4109 per km
14001 to 25000 .2550 per km
1201cc or higher
up to 1500KM .3986per KM
1501 to 14000KM .4109 per km
14001 to 25000 .2550 per km
Your help would be greatly appreciated on this
Ollie
Hi!
Read carefully the following paragraph of the article - Using multiple IF statements in Excel (nested IF functions), it covers your case completely.
See this comment for the answer to a similar question.
Question. I have been racking my brain all night on this.
I have 3 pieces of information that are linked to a master table on another sheet.
I have A1 - Date Assigned
I have A2 - Goal date
I have A3 - Date completed
I want to be able to put in a date into assigned and on my tracker have it read "A" on my master tracker
I am able to calculate a goal date, but want it to show "D" if is goes past the goal date referenced in A2 on the master tracker.
And then I want to be able to put a date in A3 and then have it read "X" for when there is a date listed for completion on my master tracker.
In addition, I want to be able to notice if there are no dates in either A1, A2, or A3 that it just shows blank on the master tracker.
I hope that is enough information to go off of.
Thanks for your help.
Hi!
Based on your description, it is hard to completely understand your task. I recommend reading this guide: Using IF function with dates.
For example, the formula might look like this:
=IF(Sheet21!A2 < > "",IF(A2>Sheet21!A2,"D",""),"")
Also worth noting I have tried to get a formula using =IF(Z6>=TODAY()-(W6*7),AJ6,IF(Z6<=TODAY()-(W6*7),AJ7,IF(AE6,AJ8, "")))
But it will only do the first two it won't allow my third argument to go.
I have a calculation between 2 cells where, based on the sum, the value should change. If not true, then the value should = the calculated sum. This is the latest attempt but not working. Thanks in advance !
if(H39*0.5)+(H41*0.5)=1.0,"1", if(h39*.05)+(h41*0.5)=2.0,"2", if (h39*.05)+(h41*0.5)=3.0,"3")))
Hi!
I fixed the errors in the syntax of the IF function
=IF((H39*0.5)+(H41*0.5)=1,1, IF((H39*0.05)+(H41*0.5)=2,2, IF((H39*0.05)+(H41*0.5)=3,3)))
Hello, and thank you so much! Getting closer but not quite there.
The problem I have is the results field is formatted with a decimal. When the result is a whole number I do not want the .0 . I have solved for this by using "". However, if the result is not a whole number (1,2, 3.) then I need the calculation to show the results "as is" ( e.g. 0.5). Here is my latest attempt but still not working. Wondering if is should use "or"?... Thanks again!
=IF(H39*0.5+H41*0.5=1,"1",H39*0.5+H41*0.5),IF(H39*0.5+H41*0.5=2,"2",H39*0.5+H41*0.5),IF(H39*0.5+H41*0.5=3,"3",H39*0.5+H41*0.5)
Hi!
Change the number format to "General" and you won't see 0 in integers.
=H39*0.5+H41*0.5
Or use the text "1" instead of the number 1.
=IF((H39*0.5)+(H41*0.5)=1,"1",IF((H39*0.05)+(H41*0.5)=2,"2",IF((H39*0.05)+(H41*0.5)=3,"3",H39*0.5+H41*0.5)))
Hello again and thank you so much for your quick reponse!
Wonderful! I'm going to go with the cell format change to "General". I learned more about the nested IF statement through this exchange but it simplifies the formula, so thank you!
Have a wonderful day!
Hey,
I am struggling to finalise a nested if function.
For context, I am trying to calculate point allocation for an online gaming tournament via Excel/Google Sheets.
These are the possible outcomes of the game depending on the end score:
Win = 3 Points
Overtime Win = 2 Points
Overtime Loss = 1 Point
Loss = 0 Points
The way the scores work on the game, I have been able to determine thresholds for scores using ratios (e.g. A score of 7:5 would be a ratio of 1.4). However, when the games haven't been played yet, the score box is empty (meaning the ratio goes to #DIV/0!) and it impacts the sum of points (which is linked to an automated league table).
I have been able to design a Nested IF formula using the ratio thresholds. There are a lot of possible end scores (7:0, 7:1, 7:2, 7:3, 7:4, 7:5, 8:6, 8:7, 7:8, 6:8, 5:7, 4:7, 3:7, 2:7, 1:7 and 0:7) which is why ratios really simplified it. The formula but can only be applied to the played games, otherwise, as said above it messes with the sum of points.
Version that works (Limited) :
=IF(A5>1.39, $D$72, IF(A5>1.10, $D$73, IF(A5>0.74, $D$74, IF(A51.39, $D$72, IF(A5>1.10, $D$73, IF(A5>0.74, $D$74, IF(A5<0.72, $D$75)))))
Legend:
A5 - Row where the ratios are (A)
I5 - Point difference column (I)
J5 - Points column (J) (where the formula is input)
$D$72 - 3 (Points)
$D$73 - 2 (Points)
$D$74 - 1 (Points)
$D$75 - 0 (Points)
$D$80 - 0 (Default point difference when game hasn't been played)
I appreciate there is a lot going on here. Any help/advice would be appreciated. I can send a screenshot on request to make it clearer but do not want to spam the blog with a link to the spreadsheet.
There seems to have been an error when posting the comment, this is the formula I have used that partially works :
=SI(A5>1.39, $D$72, SI(A5>1.1, $D$73, SI(A5>0.74, $D$74, SI(A5<0.72, $D$75))))
Thank you Alexander, I will have a look !
Hello!
Instead of a nested IF function with many conditions, you can use an approximate search with the VLOOKUP function. Here are detailed instructions and an example.
I hope this will help.
Hello,
I did it for 5 conditional, and get the feedback "You've entered too many arguments for this function". So my question is "Is there any other way for 4 and more conditions?".
Thank you in advance,
Lachin.
Hi!
How can I guess what formula you're talking about?
can i ask, I have two seperate of IF function i want to add together
=IF(E10=$K$6,"90.1",IF(E10=$K$4,"51.6",IF(E10=$K$5,"80.5")))
=IF(F11=$K$20,"85",IF(F11=$K$19,"61.3",IF(F11=$K$18,"61.3")))
how can i add these two IF together in one cell, is it possible?
Hi!
I don't think this is possible. What value should be returned if the conditions are met simultaneously - E10=$K$6 and F11=$K$20 ?
I feel like what I am attempting is not that difficult, but I have searched and searched and can't find the answer.
I will tell one of the easier scenarios and can probably get the gist of how to write it and use that on the more difficult ones.
We have a sales quota at my bank of a total of 45 items but in order to be paid a bonus some of these have to be particular things. Like you can't just open 45 savings accounts and get a bonus.
Of the 45 items you must have 11 things specific things and then after that they can be anything as long as there are 45 or more. I have already done all the calculation of the sales $ amounts separately (as if they met all rules) and have it stated in the cell above where I want to put this calculation that I will need to actually pay out.
So I just need this calculation to tell me whether to give a 0 if all are not attained or if all are attained to give the number in the cell above. Sounds simple but so far cannot figure it out.
I thought I would use an If And statement but can't get it to work correctly. It seems like I could say =IF(AND(# of checking accounts cell =3, # of savings accounts =2, # of credit cards sold =2....
I would just go down the list of required things and say- If 'this rule' AND 'this next rule AND 'this last rule' are all true then copy the cell above to down here and if it's not all true put a 0 here.
See sounds simple but I can't find an example anywhere.
Hello!
To count the number of values that match certain criteria, use the COUNTIF or COUNTIFS functions.
I hope I answered your question. If something is still unclear, please feel free to ask.
Hi Alexander,
I would like to multiply cell A3 by cell B3 to return a result in C3, however if there is no number in A3 I would like instead it to multiply A1 by B3 to return a result in C3. If both A3 and A1 are empty, I would like C3 to return no result. Can you please help me with this?
Kind regards
Hi!
I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
The formula below will do the trick for you:
=IF(AND(A3="",A1=""),"", IF(AND(A3="",ISNUMBER(A1)), A1*B3,A3*B3) )
How do I achieve the all of following to get the result in cell A3?
IF (A1="Yes") and (B1=1) then A3=C1/B1
IF (A1="Yes") and (B1=2) then A3=C2/B1
IF (A1="Yes") and (B1=3) then A3=C3/B1
IF (A1 does not = "Yes") then A3=0
Hello!
Please reread the article above since it covers your case.
Use the formula below:
=IF(A1="Yes",IF(B1=1,C1/B1,IF(B1=2,C2/B1, IF(B1=3, C3/B1,0))))
Why does this not work:
IF((F7=5),SUM(E6/F7),if(F7=4),sum(E5/F7),E2)
Hi!
I don't know what result you want to get, but try this formula -
=IF(F7=5,E6/F7,IF(F7=4,E5/F7,E2))
Ignore this one it's not what I am trying to do. Thanks
Hello,
I converted a text file into an excel and some cells are split into 2 cells. For example, cell B1 now shows up as B1 and in B2.
the sheet looks something like this:
A1: Na B1: Ly
A2: B2: dia
A3: B3:
A4: City B4: Toro
A5: B5: nto
A6: B6:
A7: Day B7: Monday
A8:Day B8:Tuesday
A9: Car B9: Audi
A10: B10: xxi
A11: B11:
what I would like to do, is have cells B1 & B2 show up in 1 cell in C1 based on the condition:
=IF((AND(B1>0,B2>0,B3=0,A2=0)),B1&B2,B1)
I also tried using the concatenate(B1,B2) instead of ,B1&B2, but got the same results:
LY
I wanted to get LYDIA.
Not sure why I am not getting the right results.
As well, is it possible in the results that cell B2 not populate again underneath so the end result will look like this:
A1: Name B1: Ly C1: Lydia
A2: B2:dia C2:
A3: B3: C3:
A4: City B4: Toro C4: Toronto
A5: B5:nto C5:
A6: B6: C6:
A7: Day B7: Monday C7:Monday
A8:Day B8:Tuesday B8: Tuesday
A9: Car B9: Audi B9: Audi xxi
A10: B10: xxi B10:
A11: B11: B11:
Thank you,
Lydia
Hello!
In the cells that look empty, some text character is written (space, line break, apostrophe). Therefore, your formula does not work. Check these cells and try this formula
=IF((AND(B1 < > "",B2 < > "",B3="",A2="")),B1&B2,B1)
I hope my advice will help you solve your task.
Sir, I have made a formula for the below calculation & its not working.
Employees will get his end of benefits based on the service tenure.
Conditions to eligible for the end of benefits based on the service years are as follows
IF service less than 1 year = 0
if >1 3 5 = salary /30* 21
If - those have long service 05 years & more, then the calculation should be - for up to 05 years (Salary/30*21) above 05 years (salary/30*30)
Hi!
Read carefully the first paragraph of this article. There is an answer to your question and an example formula.
Hello,
Thank you for the informational tutorials!
I am trying my hardest to create an excel sheet to quickly sum up points based on a score.
For example, if you finish 1st, you receive 40 pts, 2nd = 39, etc..
I have a column for "Place": 1, 2, 3...40
I have a column for "Points."
Could you please provide me with some direction on HOW to get 1st Place = 40 pts, 2nd Place = 39, etc?
I thought this would be an IF formula but I'm not getting the output I would like, just VALUE!
I would GREATLY appreciate it!
Hello!
In the "Points" column, you can use the formula
=41-A1
=IF($A$4=$P$4,($B$4=Q4)+(IF($D$4=$P$4,($E$4=Q4)+(IF($G$4=$P$4,($H$4=Q4)+(IF($J$4=$P$4,($K$4=Q4)+(IF($M$4=$P$4,($N$4=Q4),"")))))))))
Hi, can you please help me with my formula on how I can return multiple true values because for only 1 false value the rest are not showing.
Hi!
Sorry, it's not quite clear what you are trying to achieve. Please provide me with an example of the source data and the expected result.
I am trying to create a reservation log calendar that will shade corresponding dates, the condition will be - it should only shade if room number matches.
That formula works when entered in conditional formatting, only it errors if there is a single room number differ and it will not shade the rest of the dates with matching room numbers.
What function I can use to return multiple true values even if there are false values as well, I tried index and match even vlookup, but just can't figure it out.
Total 38 rooms
5 different reservation dates (with diff room numbers)
Hello!
The information you provided is not enough to understand your case.
Write what data is written in the cells that your formula refers to and what result you wanted to get.
P4 -23 (this is the room number to match from the below reservations dates)
P4-41 (38 Rooms)
A4 - 23 Room number
B4 - Jan 5
C4 - Jan 10
D4 - 23 Room number
E4 - Jan 13
F4 - Jan 18
G4 - 5 Room number
H4 - May 1
I4 - May 20
J4 - 23 Room number
K4 - Jun 2
L4 - Jun 15
M4 - 23 Room number
N4 - 12 Dec
O4 - 20 Dec
And I have a one year calendar: Q4:NQ4
What I want to achieve, if any of the room number matches to (P4), dates to automatically highlight in the calendar.
Hello!
If I understand your task correctly, the following conditional formatting formula should work for you:
=($A$4=$P$4)*($B$4=Q4)+ ($A$4=$P$4)*($C$4=Q4)+ ($D$4=$P$4)*($E$4=Q4)+ ($D$4=$P$4)*($F$4=Q4)+ ($G$4=$P$4)*($H$4=Q4)+ ($G$4=$P$4)*($I$4=Q4)+ ($J$4=$P$4)*($K$4=Q4)+($L$4=Q4)+ ($M$4=$P$4)*($N$4=Q4)+ ($M$4=$P$4)*($O$4=Q4)
I hope my advice will help you solve your task.
Apologies, this is the formula I have:
=IF($A$4=$P$4,($B$4=Q4)+(IF($D$4=$P$4,($E$4=Q4)+(IF($G$4=$P$4,($H$4=Q4)+(IF($J$4=$P$4,($K$4=Q4)+(IF($M$4=$P$4,($N$4=Q4),"")))))))))
I wish to share a screenshot but not possible when tried.
Thanks a lot.
I like to have different formulate based on the previous cell conditions eg, =if(c2="Male",2+1,if(C2="Female",2-1)) but I get error
You need an "else" option.
If there are only Male and Female in your list with no blanks then:
=if(c2="Male",2+1,2-1)
OR, instead of making a formula, just state the value for each:
=if(c2="Male",3,1)
If there are blanks:
=if(c2="Male",3,if(c2="Female",1,2))
I'm a fan of binary myself:
=if(c2="Male",1,if(c2="Female",0,""))
This counts all the males, provides a 0 for females, and a blank for anyone missing that information. This allows you to sort by that column and fill in the missing information if desired but the Else could also be something like "U" for unknown.
Hope this helps.
Hi!
What error are you getting?
UPI/103312588735/CR/NOBLE AUTO CARE K/CIU/Payment (Ref# S52276500)
TRTR/776802210414/02-02-2 02121:04:14/BNA (Ref# S52704553)
UPI/103418091878/CR/RAJAV EL/KKB/tyre (Ref# S55846936)
UPI/103418535311/CR/BALAM URUGAN RENU/UTI/UPI (Ref# S56044583)
UPI/103420379551/CR/Mr S VIJAY RAGHAV/IDI/Tyrep (Ref# S56421977)
BY CASH JAYAMOORTHY (Ref# IB82474)
i am trying to bifurcate the transactions in seperate catagory like - Cash, UPI, TRTR - how to plot multiple conditions in if statement
I am trying below formula it is not working
=IF(FIND("TRTR",F2,1),"TRTR",IF(FIND("ATM",F2,1),"ATM",0))
Please help on this
Hi!
What exactly is not working in your formula? Perhaps you need to add all the conditions. For instance,
=IF(FIND(“TRTR”,F2,1),”TRTR”,IF(FIND(“ATM”,F2,1),”ATM”,0),IF(FIND(“UPI”,F2,1),”UPI”,0))
Hello,
I've been working on an excel sheet for nearly a month and cannot figure out how to get the result that I want using IF Statements. I was able to get 2 of my statements to work the way I need them to but the third seems to require a few more IF, AND, OR statements to work but I cannot for the life of me get the result I want. My example is as follows:
=IF(A2<=1,C31/1.7,0) This statement is in cell C32 and works as I intend it to with the correct result populating in C32. C33 and C34 populate as 0 which is what is needed.
=IF(A3<=1,C31/1.3,0) This statement is in cell C33 and also works as I intend it to with the correct result populating in C33. C32 and C34 populate as 0 which is also what is needed.
=IF(AND(A2=0,A3=0),C31/1.9,0) This statement is in cell C34 calculates the correct result in C34 however, C32 and C33 also calculate their respective correct results when I need them to return a result of 0.
The actual cell data I am using is as follows:
A1 $1,321.00
A2 $567.00
A3 $1,919.00
A4 $50.00
$3,857.00
$308.56
$4,165.56
$1,000.00
$700.00
$700.00
$0.00
$0.00
$0.00
$0.00
$6,565.56
$2,500.00
$0.00
$9,065.56
$453.28
$9,518.84
$0.00
$0.00
$0.00
$0.00
$0.00
$0.00
A31 $9,518.84
A32 $0.00
A33 $0.00
A34 $0.00
Any help or insight would be greatly appreciated! Thank you!
Hello!
Try adding one more condition to your IF function.
=IF(AND(A2< = 1, A2 < > 0, A3 < > 0),C31/1.7,0) I hope it’ll be helpful.
Thank you for the insight! I will play with adding an additional condition and see where that gets me.
Just a follow up...
Your suggestions did end up working! Thank you so much! After playing around with adding an additional condition, everything is working as I need it to, and I was even able to expand on that to encompass much more data. Thank you for the insight Alexander!
Hello,
I am seeing if anyone can help me write a nested formula with multiple arguments, or what is the best way to do what I'm trying to do? the result, based on what's was rcvd. yes, if yes result would be n/a, if not rcvd, the result would be yes, if n/a, result will be n/a
RCVD NEEDED
DOC 1 YES DOC 1 N/A
DOC 2 NO DOC 2 YES
DOC 3 N/A DOC 3 N/A
=IF(X7="YES","N/A",IF(X7="NO","YES","YES",IF(X7="N/A","N/A","N/A")))
Hello!
Please check the formula below, it should work for you:
=IF(X7="YES","N/A",IF(X7="NO","YES",IF(X7="N/A","N/A","N/A")))
I need to write a formula like IF the company Name = List and Product name = List and Product category = List then The Price = List
Wonder if anyone can help me to solve this
Column B5: GOV or PRI
Column B39: Total value example 2,500
IF B5 = GOV, and B39 range 1 to 1,000 = 0, 1,001 to 2000 = 100, 2001 to 3000 = 200 etc
IF B5 = PRI, and B39 range 1 to 1,000 = 0, 1,001 to 2000 = 50, 2001 to 3000 = 100 etc
Basically i want that based on the value on B column, C column should be filled.
below is giving me value 10 for all values of B column. Kindly help
=IF(OR(B2>=0,B2=49,B2<=108),12))
Hi! How do you write 17<=C13<=28 in a formula? Please help me. Thank you.