SkysLastChance Posted August 9, 2019 Posted August 9, 2019 Stuck here scratching my head again. I am trying to write a formula =IF(AND(X2="X",Y2=""),1,"") to the B2 cell in excel. However, my code does not put anything in. I also don't get any errors. #include <Excel.au3> Local $oWorkbook $oExcel = _Excel_Open() $sWorkbook = @ScriptDir & "\VitalSite" & " " & @Mon & "_" & @MDAY & "_" & @Year & ".xlsx" $oWorkbook = _Excel_BookOpen($oExcel,$sWorkbook) _Excel_RangeWrite($oWorkbook,Default, '=IF(AND(X' & 2 & '="X",Y' & 2 & '=""),1,"Hello"', "B" & 2) You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott
Subz Posted August 9, 2019 Posted August 9, 2019 Try: _Excel_RangeWrite($oWorkbook,Default, '=IF(AND(X' & 2 & '="X",Y' & 2 & '=""),1,"Hello")', "B" & 2) SkysLastChance 1
Nine Posted August 10, 2019 Posted August 10, 2019 over complicated, try : _Excel_RangeWrite($oWorkbook,Default, '=IF(AND(X2="X",Y2=""),1,"Hello")', "B2") FYI formula may differ depending on Office language. Mine is french, so formulas use french word and different delimiter... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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