ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   help with countif function (https://www.excelbanter.com/excel-worksheet-functions/159452-help-countif-function.html)

Gareth Wretham

help with countif function
 
hi - I want to report a fixed value of '1' if the term 'defect raised'
appears in a range of cells, regardless of frequency.

the current formula I have is =COUNTIF(D49:M52,"defect raised")

but this reports the frequency instead of the value 1.

ie this should be a binary value - 1 if the term is present and 0 if
not.

no idea how to do this, any help appreciated.


Don Guillett

help with countif function
 
Look in the vba help index for FINDNEXT. A good example.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Gareth Wretham" wrote in message
ups.com...
hi - I want to report a fixed value of '1' if the term 'defect raised'
appears in a range of cells, regardless of frequency.

the current formula I have is =COUNTIF(D49:M52,"defect raised")

but this reports the frequency instead of the value 1.

ie this should be a binary value - 1 if the term is present and 0 if
not.

no idea how to do this, any help appreciated.



Max

help with countif function
 
Try it with an IF, ie as:
=IF(COUNTIF(D49:M52,"defect raised"),1,0)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Gareth Wretham" wrote in message
ups.com...
hi - I want to report a fixed value of '1' if the term 'defect raised'
appears in a range of cells, regardless of frequency.

the current formula I have is =COUNTIF(D49:M52,"defect raised")

but this reports the frequency instead of the value 1.

ie this should be a binary value - 1 if the term is present and 0 if
not.

no idea how to do this, any help appreciated.




Max

help with countif function
 
OP's reply:

--- Gareth wrote:

Thanks for this - it works.


--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




All times are GMT +1. The time now is 01:07 PM.

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