Excel - Count How Many Non-"Yes" or Non-"No" Answers - excel

Is it possible to use the COUNTIF function - or any other function - to find all values which aren't equal to "yes" or "no" values?
I am able to use COUNTIF to locate all "yes" and "no" answers (also also all blank cells), but I want to extract the "dirty" data from some survey results and include it in the "Missing" total.
I have tried to search for all values that are not equal to "yes" or "no" (by way of using the NOT function), but this failed to work.
Can this be done?
UPDATE:
Please note that I also suspect that COUNTIFS could do the trick, but am unsure exactly how to lay the function out.

=COUNTIFS may be best (if available) but with =COUNTIF I'd suggest:
=COUNTA(A:A)-COUNTIF(A:A,"Yes")-COUNTIF(A:A,"No")-COUNTIF(A:A,"=""").
If you are counting yes and no anyway then you could use the results from elsewhere in place of parts of the above formula.

You should use COUNTIFS instead since you need multiple criteria.
Try using "<>yes" and "<>no" for the criteria for COUNTIFS.
Something like
=COUNTIFS(A1:A5,"<>yes",A1:A5,"<>no")

Related

lookup with multiple conditions and for rows

Hello sages from StackOverflow,
I'm in search of a formula that can relate 3 diferent conditions, I tried using some IF statemets with the TEXTJOIN formula but I find myself lost in the way,
I got a data base just like this (image below), just a much bigger one, I want to search for a key like MCAA01 and obtain the doc's that have in front of it a "NO" all in one cell, like if you use the formula TEXTJOIN("/",...
My problem is that I cannot find a way to relate the whole column of the doc's with the key,
I tried something like TEXTJOIN("/",TRUE,IF(2ndIMAGE!A2=1stIMAGE!B1,IF(B2="no",1stIMAGE!A2,""),""))
This does give a result but it's just 1 thing, not whole answer
please sages of StackOverflow, you're my only hope. Thank you!
You need FILTER() then TEXTJOIN().
=TEXTJOIN("/",TRUE,FILTER($A$2:$A$4,FILTER($B$2:$H$4,$B$1:$H$1=$B8)="No",""))
If your version of excel supports LAMBDA() function then you can try below formula and you do not need to drag the formula to each cell. It will spill results automatically.
=BYROW(B8:B14,LAMBDA(a,TEXTJOIN("/",TRUE,FILTER(A2:A4,FILTER(B2:H4,B1:H1=a)="No",""))))

Excel: how to count based on 2 conditions if second condition can appear in multiple columns? [duplicate]

I currently have two columns with dates in them, i am trying to use the COUNTIFS to check that if the first date is greater than the second date, count up.
i currently have this but it does not work:
=COUNTIFS('CDT DWGS-2014'!F:F,2014,'CDT DWGS-2014'!S:S,"<>",'CDT DWGS-2014'!Q:Q,">" &'CDT DWGS-2014'!S:S)
I do not know what is wrong and i have been looking on the web for a while now, but i can't seem to find what is wrong.
Is there another way to go about doing this?
Thank you
You can't do a "one to one" column comparison with COUNTIFS, try SUMPRODUCT like this
=SUMPRODUCT(('CDT DWGS-2014'!F:F=2014)*('CDT DWGS-2014'!S:S<>"")*('CDT DWGS-2014'!Q:Q>'CDT DWGS-2014'!S:S))
....but I recommend you use specific ranges rather than whole columns otherwise that will be slow

In Excel which formula can write that would easily identify if my output condition is true or false

I am trying to do an excel formula calculated response in regards to comparing the values of three cells.
I have three cells and if one or more cell is populated with a value of greater than "0" I want it to return mix and if false ignore
Yes, actually you're correct you'll need to use COUNTIF or IF. The function IF should be good enough depending on your formula.
Please try to use the formula how I had in illustrated in my image. =IF(D3>TODAY(),"YES","NO"), your formula would be different depending on your values or if you're using dates.
If you're not using dates you can still just use IF plus the AND functions like this "=IF(AND(B3,C3,D3)<="","TRUE","FALSE")", see my linked file to see how I did it. Good luck!
Tip, you can check for "0"(a number) or ""(which means blank).
Check Value in 3 Cells for TRUE-FALSE example in excel.
Screenshot that might help understand how I use '=IF(AND...' Functions to do just what you originally asked.
To answer the revision to your question I would recommend referencing Microsofts resource on CONCAT function Combine text and numbers
Conversely, I've worked out an example for you. =IF(E4>0,(CONCAT("YES: B4:D4 ="," ",(TEXT(C4,"MM/DD/YY"))," + ",(TEXT(D4,"MM/DD/YY"))," + ",D4," Total Days")),"NO") which references my example screen shot here:
The use of "IF" plus the "CONCAT" function to return the mix of three or more cell values.

Vlookup from multiple source

This doesn't error, it just gives me "FALSE" as a result. I'm thinking I can't do a vlookup from two different sources, but want to verify? If not, suggestions for an alternative? Thanks!
=IF(ISBLANK(A69),"",IF(ISNA(VLOOKUP(A69,sheets!J:J,1,FALSE)),IF(ISNA(VLOOKUP(A69,Lines!B:B,1,FALSE)),"No Match",IF(VLOOKUP(A69,sheets!J:J,1,FALSE),"Matches sheet",IF(VLOOKUP(A69,Lines!B:B,1,FALSE),"Line","No Match")))))
Which do you want to check first? Perhaps try MATCH as you only seem to want to verify the presence of a match, i.e.
=IF(A69="","",IF(ISNA(MATCH(A69,sheets!J:J,0)),IF(ISNA(MATCH(A69,Lines!B:B,0)),"No Match","Line"),"Matches sheet"))
That will show "Matches sheet" if A69 is found in both sheets, if you don't want that then reverse the order of the MATCHES/text.
...or use COUNTIF
=IF(A69="","",IF(COUNTIF(sheets!J:J,A69),"Matches Sheet",IF(COUNTIF(Lines!B:B,A69),"Line","No Match")))
You'd probably be better off doing each lookup in separate cell across the row. You could also use MATCH rather than VLOOKUP. There shouldn't be a problem with what you are doing other then incorrect nesting.
You may want to drop the ISNA tests and instead try wrapping all of your VLOOKUPS in NOT(ISERROR(...)). The formula I got is:
=IF(ISBLANK(A69),"",IF(NOT(ISERROR(VLOOKUP(A69,sheets!J:J,1,FALSE))),IF(NOT(ISERROR(VLOOKUP(A69,Lines!B:B,1,FALSE))),"No Match",IF(NOT(ISERROR(VLOOKUP(A69,sheets!J:J,1,FALSE))),"Matches sheet",IF(NOT(ISERROR(VLOOKUP(A69,Lines!B:B,1,FALSE))),"Line","No Match")))))
This formula produced a result of "Matches sheet" in my very limited test. You should check whether it produces the result(s) you are looking for with your data set.

Count number of cells in a range that match the content of a different cell

I am trying to use COUNTIF in Excel to find how many items in a range match the contents of a separate cell. The idea is, the range contains everyone's answers to a given question (a one-word, non-numeric answer); the comparison column contains the correct answer. I want a count of how many people got the answer correct.
I tried: =COUNTIF(C16:BT16,"=BU16")
But it appears COUNTIF won't let me reference a cell with the criteria in it -- it requires the match criteria directly in the formula, such as =COUNTIF(C16:BT16,"DEN"). I can do that, of course, but I'd have to edit dozens of formulas every time I evaluate answers, and it would be much less timeconsuming if I could just enter the answers in column BU.
I also tried COUNTIFS; it allows multiple criteria, but also doesn't allow referencing the criteria to a different cell. Searched several different Excel websites too, any suggestions? Many thanks!
Try removing the quotes and equal sign from "=BU18" - that will indicate that you are passing the value at that cell, which I believe is what you're looking for.
=COUNTIF(C16:BT16,BU18)
Assuming BU18 contains DEN. Your first example ("=BU18") is saying "count if any of these cells have a value of "=BU18", which won't match anything (unless they answered some weird questions :) ).
Try this:
=COUNTIF(C16:BT16;BU18)
Please note that you may need to use ";" instead of "," depending on your region.
If you are using Excel 2010, you are even luckier with COUNTIFS
By all means you may use the search range and matching range within countif
e.g. =COUNTIF(SEARCH RANGE, CRITERIA RANGE)

Resources