Juvigy Posted June 11, 2021 Posted June 11, 2021 (edited) Hi Guys, I have a strange issue - maybe i miss something. This works in excel VBA: Range("A252:A255").Value = "test" This doesnt work from AutoIt : $oExcel.Application.ActiveWorkbook.Activesheet.Range("A252:A255").Value = "test" What am i doing wrong? i dont get any errors - i do have an error handler to check for those, nothing pops up. Turned out i had completely different issue - the above works from Autoit, it didnt work few times due to a bug - after restart of excel it works. What i try to do is implement something like: $oExcel.Application.ActiveWorkbook.Activesheet.Range("A252:A255").Formula = '=O&row()/AE&row()/AF&row()' Which produces in excel "=@O&ROW()/@AE&ROW()/@AF&ROW()" which doesn't evaluate and gives an excel formula error. Edited June 11, 2021 by Juvigy wrong issue
Solution Juvigy Posted June 11, 2021 Author Solution Posted June 11, 2021 Managed to implement this with: $oExcel.Application.ActiveWorkbook.Activesheet.Range("A252:A255").FormulaR1C1 = '=INDIRECT("O"&ROW())/INDIRECT("AE"&ROW())/INDIRECT("AF"&ROW())'
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now