Excel 2016 for Mac review: Spreadsheet app can do the job—as long as you don’t rely on macros Microsoft's spreadsheet app is more friendly to general Mac users, but less friendly to power users. Normally, unless you fool around with the Paste Options, Excel 2016 copies all the information in the range of cells you selected: formatting, as well the formulas, text, and other values you enter. You can use the Paste Special command to specify which entries and formatting to use in the current paste operation.
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). 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. Now, I have installed Excel for Mac 2016 and all of a sudden, the macro doesn't work anymore.
This is the script: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range('C15:H15')) > 0 Then Call copySub End If End Sub Sub copySub() Sheets('sheet1').Protect, UserInterFaceOnly:=True For i = 3 To 8 Cells(6, i).Value = Cells(6, i).Value + Cells(15, i).Value Cells(15, i).Value = 0 Next i End Sub 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'. The error seems to occur in the line: Cells(6, i).Value = Cells(6, i).Value + Cells(15, i).Value I have also tried to store the sum in a variable before assigning it to Cells(6, i).Value, but that didn't help either. Did Microsoft change the logic of the sheet protection, especially with the parameter UserInterFaceOnly set to true? Or what's going on here? I hope you can help me.
Thanks, chuky. Are you sure you've copied this code correctly? There's no way it would work in any version of Excel.
Your problems are these: • Intersect returns a Range object so your code would throw a 91 error. • There's most likely a case error in your line Sheets('sheet1').Protect.

As it's probably called 'Sheet1'. If so, this would throw a 91 error. • If you changed that worksheet name from 'sheet1', it'd throw a 91 error.
'I'd like to propose that we drop support for Mac OS X 10.3 (Panther) on the Mozilla trunk,' said Josh Aas, Mozilla's resident Mac OS X developer. Download mozilla firefox for mac.
• Why are you only protecting the sheet at Worksheet_Change. This should really be done in Workbook_Open? And if you do that, how does the user change the cells without specific cells being free from protection? It's unclear which worksheets you're referring to and where the copySub routine is held. I've updated your code as it is to remove the main errors and written in the capacity to nominate your worksheet - you'll have to adjust that as you wish. Private Sub Worksheet_Change(ByVal Target As Range) Dim ws As Worksheet Set ws = Target.Worksheet If Not Intersect(Target, ws.Range('C15:H15')) Is Nothing Then Call copySub(ws) End If End Sub Sub copySub(ws As Worksheet) ws.Protect, UserInterFaceOnly:=True Application.EnableEvents = False For i = 3 To 8 ws.Cells(6, i).Value = ws.Cells(6, i).Value + ws.Cells(15, i).Value ws.Cells(15, i).Value = 0 Next i Application.EnableEvents = True End Sub.
