This gives me the right answer when the formula is in H5, but for some
reason when I copy down I get #Value
errors or NA.
=IF(COUNTA(I5:OFFSET(I5,0,COUNTIF($2:$2,"3Test_3*")))<
6,"NA",OFFSET(H5,0,COUNTA(I5:OFFSET(I5,0,COUNTIF($2:$2,"3Test_3*")))) -
OFFSET(H5,0,COUNTA(I5:OFFSET(I5,0,COUNTIF($3:$3,"3Test_3*")))-3))
RBS
"Tom Ogilvy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> the formula you show boils down to something like
>
> say COUNTIF($3:$3,"3Test_3*") results in a value of 10 then
> offset(I4,0,0,1,10) becomes I4:R4
> Assume CountA(I4:R4) returns 5
>
> then you formula becomes
>
> =if(5<4,"NA",offset(H4,0,5)-offset(h4,0,5-3))
>
> or if(5<4,"NA",M4-J4)
>
> is that correct
>
> What cell contains the formula?
>
> --
> Regards,
> Tom Ogilvy
>
>
>
>
>
>
>
>
> "RB Smissaert" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> There still is a problem and that is caused by circular references.
>> My formula will have to look like this:
>>
>> =IF(COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3*")))<
>> 4,"NA",OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3*")))) -
>> OFFSET(H4,0,COUNTA(OFFSET(I4,0,0,1,COUNTIF($3:$3,"3Test_3*")))-3))
>>
>> Not sure what construction I need to avoid an error message. Have tried
>> with and If(IsError( construction, but
>> that still has the same problem.
>>
>> RBS
>>
>>
>> "Tom Ogilvy" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> =CountA(offset(A7,0,0,1,COUNTIF($2:$2,"3Morb_3*"))
>>>
>>>
>>> --
>>> Regards,
>>> Tom Ogilvy
>>>
>>>
>>> "RB Smissaert" <(E-Mail Removed)> wrote in message
>>> news:%23GYwu2$(E-Mail Removed)...
>>>> How in a worksheet formula would I combine these 2:
>>>>
>>>> =COUNTIF($2:$2,"3Morb_3*")
>>>> and
>>>> =COUNTA(A7:E7)
>>>>
>>>> where the result of the first formula would provide the column number
>>>> for the second formula?
>>>>
>>>> So, if the first formula produced 5 the second one would be right.
>>>>
>>>>
>>>> RBS
>>>
>>>
>>
>
>