the objective is to use a macro to merger cells AG22-AH22 (COMPLETED) but when i try to put the formula "=CELL("CONTENTS";$PAGE_4.AC18)" into a cell i get an error about parenthesis. i even tried something like the below code but got a syntax error
Code: Select all
oCells = oSheet.getCellrangeByname("AG22:AH22")
oCell = oSheet.getCellRangeByName("AG22")
oCells.merge(True)
oCell.setformula("=CELL("CONTENTS";$PAGE_4.AC18)")
Code: Select all
oCells = oSheet.getCellrangeByname("AG22:AH22")
oCell = oSheet.getCellRangeByName("AG22")
oCells.merge(True)
myformula = "=CELL("CONTENTS";$PAGE_4.AC18)"
oCell.setformula(myformula)