ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If row contains ANY value - then return "Yes" (https://www.excelbanter.com/excel-discussion-misc-queries/150125-if-row-contains-any-value-then-return-yes.html)

jgray

If row contains ANY value - then return "Yes"
 
Hey guys - I have a sheet that has (among other things) 7 different columns
associated with product failure. The workbook itself consists of a large
number of products, of which only a very small fraction will have anything
marked in any one of the failure columns. The failure columns are general
text and not necessarily numeric.

I am trying to write a If/Then so that if ANYTHING is present in ANY of the
seven columns, I will get a return of "YES" in my cell. If nothing is
present, then it will return with "NO". I will then be able to sort by "yes"
or "no".

Is it possible to write an If/Then for general, unstandardized text that
simply will recognize if something is populated? Also, columns exist between
each of the 7 failure columns. It would be helpful if these columns could be
excluded from the formula.

Mike H

If row contains ANY value - then return "Yes"
 
Hi,

Try this
=IF(COUNTIF(A1:G1,"<")1,"Yes","No")

Mike


"jgray" wrote:

Hey guys - I have a sheet that has (among other things) 7 different columns
associated with product failure. The workbook itself consists of a large
number of products, of which only a very small fraction will have anything
marked in any one of the failure columns. The failure columns are general
text and not necessarily numeric.

I am trying to write a If/Then so that if ANYTHING is present in ANY of the
seven columns, I will get a return of "YES" in my cell. If nothing is
present, then it will return with "NO". I will then be able to sort by "yes"
or "no".

Is it possible to write an If/Then for general, unstandardized text that
simply will recognize if something is populated? Also, columns exist between
each of the 7 failure columns. It would be helpful if these columns could be
excluded from the formula.


Mike H

If row contains ANY value - then return "Yes"
 
Oops,

try this instead

=IF(COUNTIF(A1:G1,"<")=1,"Yes","No")

"jgray" wrote:

Hey guys - I have a sheet that has (among other things) 7 different columns
associated with product failure. The workbook itself consists of a large
number of products, of which only a very small fraction will have anything
marked in any one of the failure columns. The failure columns are general
text and not necessarily numeric.

I am trying to write a If/Then so that if ANYTHING is present in ANY of the
seven columns, I will get a return of "YES" in my cell. If nothing is
present, then it will return with "NO". I will then be able to sort by "yes"
or "no".

Is it possible to write an If/Then for general, unstandardized text that
simply will recognize if something is populated? Also, columns exist between
each of the 7 failure columns. It would be helpful if these columns could be
excluded from the formula.


Peo Sjoblom

If row contains ANY value - then return "Yes"
 
=IF(COUNTA(A1:G1)0,"Yes","No")


--
Regards,

Peo Sjoblom



"jgray" wrote in message
...
Hey guys - I have a sheet that has (among other things) 7 different
columns
associated with product failure. The workbook itself consists of a large
number of products, of which only a very small fraction will have anything
marked in any one of the failure columns. The failure columns are general
text and not necessarily numeric.

I am trying to write a If/Then so that if ANYTHING is present in ANY of
the
seven columns, I will get a return of "YES" in my cell. If nothing is
present, then it will return with "NO". I will then be able to sort by
"yes"
or "no".

Is it possible to write an If/Then for general, unstandardized text that
simply will recognize if something is populated? Also, columns exist
between
each of the 7 failure columns. It would be helpful if these columns could
be
excluded from the formula.




jgray

If row contains ANY value - then return "Yes"
 
Thanks to both of you. I tried it out and it works like a champ.

"Peo Sjoblom" wrote:

=IF(COUNTA(A1:G1)0,"Yes","No")


--
Regards,

Peo Sjoblom



"jgray" wrote in message
...
Hey guys - I have a sheet that has (among other things) 7 different
columns
associated with product failure. The workbook itself consists of a large
number of products, of which only a very small fraction will have anything
marked in any one of the failure columns. The failure columns are general
text and not necessarily numeric.

I am trying to write a If/Then so that if ANYTHING is present in ANY of
the
seven columns, I will get a return of "YES" in my cell. If nothing is
present, then it will return with "NO". I will then be able to sort by
"yes"
or "no".

Is it possible to write an If/Then for general, unstandardized text that
simply will recognize if something is populated? Also, columns exist
between
each of the 7 failure columns. It would be helpful if these columns could
be
excluded from the formula.





Teethless mama

If row contains ANY value - then return "Yes"
 
=IF(COUNTA(A1:G1),"Yes","No")


"jgray" wrote:

Hey guys - I have a sheet that has (among other things) 7 different columns
associated with product failure. The workbook itself consists of a large
number of products, of which only a very small fraction will have anything
marked in any one of the failure columns. The failure columns are general
text and not necessarily numeric.

I am trying to write a If/Then so that if ANYTHING is present in ANY of the
seven columns, I will get a return of "YES" in my cell. If nothing is
present, then it will return with "NO". I will then be able to sort by "yes"
or "no".

Is it possible to write an If/Then for general, unstandardized text that
simply will recognize if something is populated? Also, columns exist between
each of the 7 failure columns. It would be helpful if these columns could be
excluded from the formula.


Ginetta

If row contains ANY value - then return "Yes"
 
On Jul 13, 10:42 am, Teethless mama
wrote:
=IF(COUNTA(A1:G1),"Yes","No")

"jgray" wrote:
Hey guys - I have a sheet that has (among other things) 7 different columns
associated with product failure. The workbook itself consists of a large
number of products, of which only a very small fraction will have anything
marked in any one of the failure columns. The failure columns are general
text and not necessarily numeric.


I am trying to write a If/Then so that if ANYTHING is present in ANY of the
seven columns, I will get a return of "YES" in my cell. If nothing is
present, then it will return with "NO". I will then be able to sort by "yes"
or "no".


Is it possible to write an If/Then for general, unstandardized text that
simply will recognize if something is populated? Also, columns exist between
each of the 7 failure columns. It would be helpful if these columns could be
excluded from the formula.


Those examples check every column from A to G.
If you have 7 columns over 9 columns where you have 2 columns that you
want to ignore
these examples need to be tweaked
Tweak the examples to check only the groups of columns with failure
data
in them rather than checking contiguously, one might do the following.

EG if you have A:E then H:I you might want to try;
=IF(COUNTA(A1:E1),"Yes",IF(COUNTA(H1:I1),"Yes","No "))

And any variations of that nested IF statement.

Nick



All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com