Excel 2016 for mac vba not working

broken image

The error seems to occur in the line: Cells(6, i).Value = Cells(6, i).Value + Cells(15, i).Value When I enter a value and press tab in Excel 2016, I get the runtime error 91 'Object variable or With block variable not set'.

broken image

Sheets('sheet1').Protect, UserInterFaceOnly:=TrueĬells(6, i).Value = Cells(6, i).Value + Cells(15, i).Value If Intersect(Target, Range('C15:H15')) > 0 Then This is the script: Private Sub Worksheet_Change(ByVal Target As Range) Now, I have installed Excel for Mac 2016 and all of a sudden, the macro doesn't work anymore.

broken image

Initially, I developed and used it in Excel 2013, then I have switched to Mac and have since used it in Excel for Mac 2011. I have developed a small VBA macro in Excel that's supposed to add the values of cells in row 15 to the values of cells in row 6 during workbook change (in my case entering a number in row 15 and pressing tab).