A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
JBurnside
re: code error
Your code works for me in xl2010 and it should work in xl2016.
From the many complaints I've seen about xl2016, I've concluded it is not worth having.
What you can try is to relace .Value2 with .Value
Probably won't make a difference, but try it.
Also, you can simplify your code by replacing...
rangData(M).Offset(0, -1).Range("A1:O1").Select
Selection.Borders(xlEdgeTop).LineStyle = xlContinuous
With...
rangData(M).Offset(0, -1).Range("A1:O1").Borders(xlEdgeTop).LineStyle = xlContinuous
'---
Jim Cone
Portland, Oregon USA
https://goo.gl/IUQUN2 (Dropbox)
(free & commercial excel add-ins & workbooks)