I'm struggling with something I think should be easy, it seems to be a common problem, I've found another solution here on the website but it won't work here in my document.
I want to find the (exact) value into a range, and having a true or false result if this value was found.
I tried with the combination of the find, isnumber and sumproduct formula but the value is never found, if I use a nested if formula it's working.
I have a dutch version of Excel, that's why you see "onwaar / waar" but onwaar is "false" and waar is "true".
Also my formula is written in dutch, but I translated it through the Excel-Translator.de website, I'm not 100% sure if it's done correctly.
In cell F2 I have this formula:
=SUMPRODUCT(SUMIF(E2, $A$2:$A$11))>0
In cell G2 I have this formula:
=IF(E2=$A$2,TRUE,
IF(E2=$A$3,TRUE,
IF(E2=$A$4,TRUE,
IF(E2=$A$5,TRUE,
IF(E2=$A$6,TRUE,
IF(E2=$A$7,TRUE,
IF(E2=$A$8,TRUE,
IF(E2=$A$9,TRUE,
IF(E2=$A$10,TRUE,
IF(E2=$A$11,TRUE,FALSE))))))))))
Thanks for your help.
First use function =COUNTIF($E$2:$E$11,A2) to know if the search value column contains your value.
Then, use function =IF(F2>=1,"True","False") determine true or false.
Combined, yout get =IF((COUNTIF($E$2:$E$11,A2)),"True","False")
screenshot of working example
Related
So, I am looking to test the contents of a cell ie check if the cell is using "sum()" or "average()" or "frequency()" but not checking for the numerical result - that I can do and have achieved.
I have tried:
=CELL("type",C10)
cell C10 contains a frequency() function with a result of 10, so the cel() function gives a result of "v" as in value.
Also used "contents" and "format" in the cell function...
So, I have a feeling this is going to be vba...
From Excel 2013 onwards you can use the build-in function: =ISFORMULA()
You can use the formula =FORMULATEXT(). In case thise gives #N/A, you don't have a formula (check using IsNA()).
What I am working on is a quality-assurance spreadsheet, designed to analyse and quality check another spreadsheet for any errors in it's output and it's formulas.
On that latter note, I want to know if there's a formula that can inspect a cell (which also contains another formula) and return true or false if it contains a certain string of text, that is PART OF THE FORMULA itself.
For example, say in Cell A1 the formula is: =CEILING.PRECISE(B4) and equals 3.
I want to find out if the formula contains the word "Precise", which would then return TRUE. Another example being to see if the formula contains the string "B4" which would also return TRUE.
Depending on what Excel version you use....
Excel 2013/2016:
Make use of the build-in =FORMULATEXT() function. The function will return the formula of the referenced cell as text string. As such you could nest this in an =IF(...) statement.
Lower Excel version:
Make use of an UDF to accomplish the same effect. This doesn't have to be complicated. A simple UDF like below does the job.
Function FORMULATEXT(CL As Range)
FORMULATEXT = CL.Formula
End Function
The Answer of JvdV is already giving you everything you need about transforming the formula in a string.
In addition to this you can also use the FIND function to find if the word "PRECISE" is inside your formula.
=IF(FIND("PRECISE";FORMULATEXT(A1);1)>0;"TRUE";"FALSE")
Of course finding if B4 is inside would just be a small change after.
I've devised a formula that I want my cells to have, but I only want the value to show up if ANOTHER cell is populated with the value that I want.
My current formula is below:
=COUNTIFS($R$3:R21, "Brain")
However, this formula doesn't check whether or not the other cell has the value that I want to check for.
I put together a formula that I thought would check for whether or not the cell is populated:
=COUNTIFS($R$3:R21, "Brain", R21, "Brain")
Unfortunately, this formula doesn't work (it returns #VALUE!). I think it fails because R21 is already included in the COUNTIFS.
I also tried this similar formula, which also failed to work:
=COUNTIFS($R$3:R21, "Brain", R21:R21, "Brain")
I looked online and I found this possible solution:
=IF(ISNUMBER(SEARCH("Brain",R21)),"COUNTIFS($R$3:R21, 'Brain')","")
Unfortunately, this formula displays the text of the formula I want, and not the actual value of the formula.
Does anyone know how I could display the value from the formula ONLY if the cell I'm checking has the value that I want? Thanks.
Try
=IF(ISNUMBER(SEARCH("Brain",R21)),COUNTIFS($R$3:R21, 'Brain'),"")
Actually I am not much familiar with Excel formulas.
I am using dates from Column E and F to color cells
=+IF(AND(DATEVALUE(I1)>=DATEVALUE($E$2);DATEVALUE(I1)<=DATEVALUE($F$2));1;2)
This formula is working fine when there is value present for column E and F.
if there is no value present for E and F it results error value.
I know little bit about ISBLANK() function.
I want to add condition to check cell E2 and F2 are not blank before my existing formula. Can you please suggest the proper syntax?
Thanks
You need to wrap your current operations in a function that checks each cell. If either of them is blank, you probably want to return "", or else the IF will automatically return FALSE.
You could use a chain of ifs, but since ISBLANK returns a boolean we can instead use an OR.
OR(ISBLANK($E$2),ISBLANK($F$2))
will return TRUE if either of the two cells is blank, so you'll need to put your operations into the False option, giving us:
=IF(OR(ISBLANK($E$2),ISBLANK($F$2)),"",IF(AND(DATEVALUE(I1)>=DATEVALUE($E$2),DATEVALUE(I1)<=DATEVALUE($F$2)),1,2))
Although you seem to have strange syntax, probably down to language settings or something, so you may prefer this:
=+IF(OR(ISBLANK($E$2),ISBLANK($F$2));"";IF(AND(DATEVALUE(I1)>=DATEVALUE($E$2);DATEVALUE(I1)<=DATEVALUE($F$2));1;2))
Use this condition which will ensure that both are not blank:
IF(OR(ISBLANK($E$2),ISBLANK*($F$2), your operations, "")
Thanks to all for your suggestions and valuable time.
But after reading some office.com documentation I find a proper solution.
IFERROR is more suitable than ISBLANK for my problem
instead of checking for blank cells I directly apply DATEVALUE() on cell . so if there is a blank cell DATEVALUE() return error and IFERROR() condition set value 2.
=+IF(AND(DATEVALUE(G1)>=IFERROR(DATEVALUE($E$7),0),DATEVALUE(G1)<=IFERROR(DATEVALUE($F$7),0)),1,2)
As in title, I'm trying to compare two lists and when a formula hits the match I want it to type the text, but from the cell right next to the found matching cell.
For example: A list of 5343 positions B1:B5343 has corresponding reference numbers in A column (A1:A5343). F1 has a certain number. G1 ought to show the reference number, not the match itself.
I've tried to work with this formula:
=IF(ISERROR(MATCH(F1;$B$1:$B$5343;0));"";A1)
Where A1 should be the reference cell. Not fluent in Excel enough to know
is there a way to refer to a formula result?
is it possible to refer to a cell next to the cell of interest (or few away)? ex.(B-1)54=A54
Not sure how can I clarify the problem more than that :) Help me out please!
Eager to read Your answers! Cheers!
This is a typical case for Vlookup
i would probably go for a index match on this, so INDEX(C:C,MATCH(F1,B:B,0),1)
the index part will go get the cell next to it you want, just replace C:C with the column its in
If its not a match use iferror, rather than iserror as well, Its better practice.
SO : IFERROR( INDEX(C:C,MATCH(F1,B:B,0),1) ,"NO MATCH)
Heres a tutorial