excel error with formula if and vlookup - excel

=IF(D6=D$62;VLOOKUP(C6;D$63:E$68;2;FALSE);IF(D6=G$62;VLOOKUP(C6;G$63:H$67;2;FALSE)))
Can some one help? I have done this formula, but when I press enter then the answer in the cell is false instead of the value which is supposed to look up.

This is returning False because the second IF formula doesn't have the third parameter specified. IF takes three parameters, and if you neglect the third, it will just return False.
What this means is that D6 is not equal to D$62 and D6 is not equal to G$62, so it says False. In other words, it doesn't even attempt either Vlookup since neither condition is true.

Related

I have some problem with this excel formula =IF(A2:J2=O2,"Yes","No")

I am testing this if condition to whether O2 cell is matching with an element in A2:J2.
But the formula is displaying in the other 10 cells.
How can I get rid of this issue and execute the formula in only one cell?
Your criteria for the IF function: A2:J2=O2 is an array, which is the reason why it's spilling the values to the other cells. It's basically doing this: A2=O2 B2=O2 C2=O2 D2=O2 and so on..
And it returns all of the result of these. Therefore, you will have an array of results.
Maybe you want to consider this formula: =IF(ISNUMBER(MATCH(O2,A2:J2,0)),"Yes","No")
The match searches for O2 in A2:J2. If it finds the first match, it will return its position within the range. Otherwise, it will return an error. Therefore, we use ISNUMBER to check if the result of the match is a number. If it's a number, the ISNUMBER will return true. Otherwise, false. Then we'll use IF to capture the result of the ISNUMBER to return Yes if TRUE and No if FALSE.
Another way to solve this issue:
=IF(COUNTIF(A2:J2,O2)>0,"Yes","No")
this formula will count the content of cell O2 within A2:J2 and if available, it will return a number greater than 0.

Lookup and join text gives zero instead of blank

I am trying to lookup values based on two simple criterias.
Here is my formula:
{=TEXTJOIN(". ";TRUE;IF(F1=A2:A6;IF(F2=B2:B6;C2:C6;"");""))}
However, I get 0 in the middle of the text join. How can I ignore values in Text when it is actually empty or blank and get expected value of One. Two. Three. Five instead of One. Two. Three. 0. Five, where cell B5 is ignored and blank.
It's completely logical. It's just not as you intended it to work. Both IF conditions are TRUE and the next thing you tell the formula to return C2:C6 values. Therefore the IF returns a zero (you should use the evaluate formulas option to see what's going on), and therefore no longer an empty cell in a range, but a zero in an array. The TRUE parameter in the TEXTJOIN is therefor no longer helping you. To overcome this you could try:
=TEXTJOIN(". ",TRUE,IF((A2:A6=F1)*(B2:B6=F2)*(C2:C6<>""),C2:C6,""))
Note: It's an array formula and need to be confirmed through
CtrlShiftEnter
Try using array formula as below to get the desired result. Place the TEXTJOIN inside IF.
=IF(F1=A2:A6, IF(F2=B2:B6, TEXTJOIN(". ", TRUE, C2:C6), ""), "")

My formula works in one cell but returns FALSE in another cell

I am trying to perform a calculation and the first IF(OR) condition is giving me the right answer, but the second and third IF(OR) conditions are returning "FALSE" instead of a number.
Cell A23 is a dropdown list of products.
Below is my formula. What am I doing wrong?
=IF(OR(A23="ICS OTT",A23="ICS UI"),ROUNDUP(($B$3*$B$5/250*(1+$B$7)),
IF(OR(A23="ICS+VCS UI"),ROUNDUP(($B$3*$B$5/180*(1+$B$7)),
IF(A23="VCS Apps",ROUNDUP(($B$3*$B$6/180*1+$B$7),
"NA"))))))
I think you're missing a parameter in your ROUNDUP function -- it's expecting a second parameter for the precision of the rounding. Assuming you are rounding to a whole number, this should do the trick:
=if(OR(A23="ICS OTT",A23="ICS UI"),ROUNDUP(($B$3*$B$5/250*(1+$B$7)),0),
if(A23="ICS+VCS UI",ROUNDUP(($B$3*$B$5/180*1+$B$7),0),
if(A23="VCS Apps",ROUNDUP(($B$3*$B$6/180*1+$B$7),0),
"NA")))

Excel formula for comparing 2 cells with values

I need a formula that displays the below, but cannot for the life of me get it to work:
If A1 is not blank, B1 must be 'yes' (I want either a 0 or 100 to be displayed in C1 dependant on result).
Thanks,
You'll need to chain a few functions together. The first is ISBLANK() which, as it sounds, tells you if the value provided is blank. As you mentioned, you want the case when it's not blank, so you'll need to enclose this in the NOT() function, which will reverse the boolean result.
For example, when B1's formula is =ISBLANK(A1), the result is FALSE when A1 is not blank. Since you want it to be TRUE, you'll use =NOT(ISBLANK(A1)).
To get B1 to show a value besides TRUE or FALSE at this point, you can use the IF() function, which allows you to specify a value to be shown when the result is TRUE and a different value for FALSE.
In your case, =IF(NOT(ISBLANK(A1)),'yes','no') should give you yes when A1 is not blank, and no when A1 is blank.
You can also utilize the IF() function in C1 to do your additional "0 or 100" logic.
So:
A1
Project one
B1
Yes or No
C1 - if project one, is 'yes' then value to be 100, if project one is 'no' then value to be 0.
You Can Use If Condition.
Formula Is :
If(A1=B1,"Match","Not Match")
Where A1,B1 Cell Values ,
If Condition Is True Than Match Will Execute Otherwise Not Match Will Execute.
Write This Condition in C1 Cell
Excel Formula:
=IF(ISBLANK(A1), "No", "Yes")

Using the Concatenate function in an IF statement

I am trying to find a string in excel cells, and it works to some extent, but when the value returns false I simply get "FALSE" in the cell, although when it returns a true value it actually changes the cell to what I have defined in the IF statement.
Is this because I have inserted the concatenate query incorrectly in the if statement?
My formula is as follows:
=IF(ISNUMBER(SEARCH(ET2:ET4,B2)),"yes",F2=CONCATENATE("NA ",B2))
The reason you get false is the bit that says
F2=CONCATENATE("NA ",B2)
I think you're trying to use this as an assignment (ie set the cell F2 to the value of the ConCat).
What it will actually do is compare the value of F2 and the value of the concat, and return TRUE if they are equal and FALSE otherwise. This TRUE or FALSE value is what you are ending up with in your cell.
So to fix it:
If the above formula is in the cell F2, then just remove the F2= from the formula and it should work.
If the above formula not in the cell F2, then you need to put either this same formula or a slightly altered one into that cell to populate F2.

Resources