The name of the functon is
SUBTOTAL() .formula = "=SUBTOTAL(9," + elrango + ")"
>
>I´m making some automation with Excel. At the end, I´m making some formulas, something like this:
>
>
> nvorango = "I" + ALLTRIM(STR(lnFila))
> elrango = "I5:I" + ALLTRIM(STR(mifinal))
> WITH .RANGE(nvorango)
> .formula = "=SUBTOTALES(9," + elrango + ")"
> ENDWITH
>
>
>This code returns something like this in the formula bar:
>
>
> =SUBTOTALES(9,I5:I3765)
>
>
>It seems good but I get an
#¿NAME? error on the cell. If I edit the cell WITHOUT any change, the result apears normal. It's the same thing with other kind of formulas.
>
>Does anybody know how can I avoid this behavior? BTW, I´m using MS Excel 2003 (Spanish), but it's the same trouble in other versions.
>
--sb--