=SUMPRODUCT((Attendance!A6:A381<=Bob!A5)*(Attendance!A6:A381>=Bob!A5-6)

*(1+ISNUMBER(SEARCH("A",Attendance!B6:B381))**/2**)

Your formula nearly works, it has found an additional "A"s being the one's in the date list (attendance!a6:A381) rather than finding only the a's in column b.

Only by coincidence or if you mistyped the SEARCH range as

**A**6:B381.

*My* SEARCH range only looks at

**B**6:B381. It is not possible that it found an "A" in other range.

__Hypothetically__, my SUMPRODUCT might include a row with "A" in column A; but only if there is

__also__ an "A" in column B.

However, I think even that is not possible because the assumption of your comparisons with Bob!A5 is that column A is numeric. If it were text, the "<=" comparison would return FALSE, even if Bob!A5 were numeric text.

-----

More importantly, I think I misinterpreted the intent of your original formula, and my formula is incorrect for other reasons.
I think the following might work for you.

Code:

```
=SUMPRODUCT((Attendance!A6:A381<=Bob!A5)*(Attendance!A6:A381>=Bob!A5-6)
* ( Attendance!B6:B381=Attendance!D2
+ ISNUMBER(SEARCH(Attendance!D2 & "/?", Attendance!B6:B381))/2
+ ISNUMBER(SEARCH("?/" & Attendance!D2, Attendance!B6:B381))/2 ))
```

Add absolute references ("$") appropriately. Your original use of relative and absolute references is inconsistent, IMHO.

Where the column A condition is true (between Bob!A5-6 and Bob!A5), that formula is intended to

__count 1__ if B equals D2

*or count 0.5* if B matches D2 preceded by a character and slash or followed by a slash and character.

I believe that was your intent. If not, please explain your intent.

Note that the formula also counts 1 (0.5 twice) if B matches D2 that is

__both__ preceded by a character and slash and followed by a slash and character.

Your formula does the same thing. So I presume that either that is acceptable or, more likely, you assume that the conditions are mutually exclusive. Alternatively, perhaps that is also an error in your original formula.

However, my formula also counts 0.5 if there is

__more than one__ character before or after the slash.

If that cannot happen or that is acceptable, great!

But if it can happen and your intent is to count that as zero, as your formula does, please let me know. I can offer a more complex formula that counts that condition correctly.