Skip to Content
0
Former Member
Dec 02, 2009 at 03:46 PM

InStr for a Count

23 Views

I have fields with quite a bit of text in them. I'd like to eventually get a count of all fields that have the word "Care" in them. Here's the formula I've tried using:

if InStr({Response.Response}, "care") >= 1 then 1 else 0

I'm expecting this to return a zero if the word "care" doesn't occur, or, based on the character position of its occurance, converting it to one if it does occur.

What am I doing wrong? Maybe case sensitivity is affecting it? I tried using the instr compare for a case-insensitivity, but still the results aren't as expected.

(eventually I plan to count the occurances of "care", only counting one per field...I don't care if "care" occurs more than once)

Edited by: Michelle2mmb on Dec 2, 2009 5:14 PM updated title