Fill down formula programmically
If you design the macro to determine that, it certainly will.
set rng = Range("A1").CurrentRegion
set rng = rng.resize(,1)
rng.offset(0,10).Formula = "=Sum(B1:G1")
as an example.
--
Regards,
Tom Ogilvy
"Pat" wrote in message
...
As the appropriate number of cells will vary the macro created will not in
my option take this into account.
"Tom Ogilvy" wrote in message
...
create a macro that adds the formula to the appropriate cells and saves
the file as CSV.
Don't prefil the formula.
--
Regards,
Tom Ogilvy
"Pat" wrote in message
...
Can anyone tell me if is possible to fill down a formula as and when
required programmically.
I will try to explain what I mean.
What I am currently doing is saving a .xls file as a .csv file then
importing that file into another program which I do regularly. The
..csv
file
has extra rows containing a formula that usually contain no data. The
reason for having more of the same formula that may not be used at
that
time
when saving is that it avoids having to check the .csv file to
determine
if
all data has been saved in the new format. The problem I am
experiencing
is
that it causes problems in the program I am importing into.
Hope someone can show me a way around this.
Thanking you.
Pat
|