G
Guest
I built a macro which Inserts Copied Cells (about 20 rows or so each time its
used) at the TOP of a data table, right below the header row in columns A
through D and right above all the existing data already in the table. The
macro then appends formulae to the right of the inserted data in columns E
through G by using AutoFill and a hidden row above the data housing the
formulae that need to be copied below.
Here's the catch: It's essential that the macro only fills the BLANK CELLS
downward until it hits the formulae it inserted the last time it was run, NOT
the whole column of data.
To so this, I used the following code:
Range("E12"G12").AutoFill Destination:=Range("E12", Range("G12").End(xlDown)
(0))
On my computer it works fine: if I insert 12 rows, the macro copies the
hidden formulae down 12 rows, not overwriiting anything below it. However,
on my client's computer, the macro consistently overwrites the entire column.
Someone on this board suggested I delete the "(0)" at the end the code, but
that unfortunately did nothing.
I'm so desperate to solve this - if anyone has any thoughts or suggestions,
I'd be incredibly grateful!!! Are there possibly Tools/Option selections
that might cause this to happen? Or other things specific to a certain
computer?
Many, many, many thanks,
Marika
used) at the TOP of a data table, right below the header row in columns A
through D and right above all the existing data already in the table. The
macro then appends formulae to the right of the inserted data in columns E
through G by using AutoFill and a hidden row above the data housing the
formulae that need to be copied below.
Here's the catch: It's essential that the macro only fills the BLANK CELLS
downward until it hits the formulae it inserted the last time it was run, NOT
the whole column of data.
To so this, I used the following code:
Range("E12"G12").AutoFill Destination:=Range("E12", Range("G12").End(xlDown)
(0))
On my computer it works fine: if I insert 12 rows, the macro copies the
hidden formulae down 12 rows, not overwriiting anything below it. However,
on my client's computer, the macro consistently overwrites the entire column.
Someone on this board suggested I delete the "(0)" at the end the code, but
that unfortunately did nothing.
I'm so desperate to solve this - if anyone has any thoughts or suggestions,
I'd be incredibly grateful!!! Are there possibly Tools/Option selections
that might cause this to happen? Or other things specific to a certain
computer?
Many, many, many thanks,
Marika