To run the formula from any active cell
You are correct . Thats my wrong because I given as FormulaR1C1 instead of
Formula. Many thanks
"Mike H" wrote:
Hi,
Maybe this
ActiveCell.Formula =
"=IF(COUNTIF([item.xls]item!B:B,G7),VLOOKUP(G7,[item.xls]item!B:L,11,0),0)"
Mike
"pol" wrote:
In my macros I wrote the formula as follows.
ActiveCell.FormulaR1C1 =
"=IF(COUNTIF([item.xls]item!C[-11],RC[-6]),VLOOKUP(RC[-6],[item.xls]Item!C[-11]:C[-1],11,0),0)"
the output formula would be as like this:
=IF(COUNTIF([item.xls]item!B:B,G7),VLOOKUP(G7,[item.xls]item!B:L,11,0),0).
So is it possible to write the formula the same as that of seconed formula
in my macro.Becuuse I need to run the formula from any active cell which may
be L7 or M7. So please help me to write that formula to enable to run from
any active cell.
With thanks
Pol
|