View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Fill formula down using macro

Hi,

Here is one example which puts the formula in all the cells

LastCell = [A1].End(xlDown).Row
Range([B1], "B" & LastCell) = "=COUNTIF(INDIRECT(R1C&""!A1:D10""),RC1)"

Note this is not a fill down command it puts the formula of interest in all
the cells indicated.

Cheers,
Shane Devenshire


"Charles" wrote:

hi, using VBA I would like to fill a formula down to end of my data rather
than to a fixed cell as the size of my data is different each time I run my
macro.