pasting formula with Visual basic

R

Rob

Hi all,
I'm trying to paste the following formula using visual basic

=IF(GSTStatus="GST",Credit+Debit)/GSTDivideBy,)
(the GSTStatus, Credit, Debit and GSTDivideBy are all difined names)

To do this I have tried this but the "GST" part won't let me.
ActiveCell.Offset(1, -9) = "=IF(GSTStatus="GST",Credit+Debit)/GSTDivideBy,)"

Any clues?

Rob
 
R

Rob

Hi Norman,

I couldn't get your reply through OE for some reason and found it using
Google.
After I posted my question, about 1 second later, I realised that I could
make the whole formula a defined name and paste it using VBA without a
problem. But I'll remember your solution as well....so thanks!!

Rob
 
Top