Greetings-
Having trouble creating a formula that checks for 2 distinct criteria in a range within 2 different columns to determine if they are true or false (each criteria is in a range in different columns). I hope someone here can help.
It needs to function like this:
If criteria 1 is TRUE it then proceeds to check the 2nd criteria. If the 2nd criteria is TRUE, it will return a “NO”, if the 2nd criteria is FALSE, it will return a “YES”. And if the 1st criteria is FALSE, it will not proceed to check the 2nd, and it will return a “NO”.
Example:
-Search in A1:A60 for the same as A75 (search criteria 1). If TRUE, then proceed to search for 2nd criteria of “OFF” in F1:F60. If FALSE, return a “NO”, do not proceed to search for criteria 2.
-If search criteria (“OFF”) is TRUE in F1:F60, return a “NO”, if it is FALSE, return a “YES”.
The following formulas work, but each have an issue:
{=IF(A1 =A75,IF(F1 ="OFF","NO","YES"),"NO")} - this works for single cells, but need it to work for range
{=IF(COUNTIF(A1:A60,A75),IF(COUNTIF(F1:F60,"OFF"),"NO","YES"),"NO")} – this works fine, however it stops working if you do the following specific sequence: with the search criteria in column "A" of "Brick", say "A40", and something other than "OFF" in "F40", the result is "YES" (correct). If you change "F40" to "OFF" - the result is "NO" (correct), and then change "A40" to something other than "Brick", it still returns "OFF" (correct). But now if you change "A25" to "Brick", and "F25" is not populated with "OFF", the result is "NO" (incorrect, should be "YES"). From that point on, the function no longer works, no matter which cells are changed.
If you don't do that specific sequence, the formula works up and down the range correctly: you can toggle "A" cells to different values without breaking the function, and whenever you have "Brick" in a cell, it will give the appropriate return of "NO" if the corresponding "F" column cell has "OFF", or a "YES" if the "F" column cell doesn't have "OFF".
{=IF(SUM(--ISNUMBER(FIND(A66,A6:A57,1))*(--ISNUMBER(FIND("OFF",B6:B57,1)))),"NO","YES")} – this works, except if criteria 1 is not present in the “A” range, it does not stop and return a “NO”, it returns a “YES”.
Thanks in advance for any assistance.
Having trouble creating a formula that checks for 2 distinct criteria in a range within 2 different columns to determine if they are true or false (each criteria is in a range in different columns). I hope someone here can help.
It needs to function like this:
If criteria 1 is TRUE it then proceeds to check the 2nd criteria. If the 2nd criteria is TRUE, it will return a “NO”, if the 2nd criteria is FALSE, it will return a “YES”. And if the 1st criteria is FALSE, it will not proceed to check the 2nd, and it will return a “NO”.
Example:
-Search in A1:A60 for the same as A75 (search criteria 1). If TRUE, then proceed to search for 2nd criteria of “OFF” in F1:F60. If FALSE, return a “NO”, do not proceed to search for criteria 2.
-If search criteria (“OFF”) is TRUE in F1:F60, return a “NO”, if it is FALSE, return a “YES”.
The following formulas work, but each have an issue:
{=IF(A1 =A75,IF(F1 ="OFF","NO","YES"),"NO")} - this works for single cells, but need it to work for range
{=IF(COUNTIF(A1:A60,A75),IF(COUNTIF(F1:F60,"OFF"),"NO","YES"),"NO")} – this works fine, however it stops working if you do the following specific sequence: with the search criteria in column "A" of "Brick", say "A40", and something other than "OFF" in "F40", the result is "YES" (correct). If you change "F40" to "OFF" - the result is "NO" (correct), and then change "A40" to something other than "Brick", it still returns "OFF" (correct). But now if you change "A25" to "Brick", and "F25" is not populated with "OFF", the result is "NO" (incorrect, should be "YES"). From that point on, the function no longer works, no matter which cells are changed.
If you don't do that specific sequence, the formula works up and down the range correctly: you can toggle "A" cells to different values without breaking the function, and whenever you have "Brick" in a cell, it will give the appropriate return of "NO" if the corresponding "F" column cell has "OFF", or a "YES" if the "F" column cell doesn't have "OFF".
{=IF(SUM(--ISNUMBER(FIND(A66,A6:A57,1))*(--ISNUMBER(FIND("OFF",B6:B57,1)))),"NO","YES")} – this works, except if criteria 1 is not present in the “A” range, it does not stop and return a “NO”, it returns a “YES”.
Thanks in advance for any assistance.