Uiautomation

see this - Fastest way to write an excel formula into an entire column