The arguments to Cells are (row, column). They must be expressions that evaluate to numbers; you can't use "M" as a column indicator. Replace it with 13. Same for "N".
For Range, you have to use a string that gives a range, such as "M1:M1001" (there are other forms as well but let's just limit ourselves to your code). Anything that you put in there you would also be able to use in a worksheet formula like SUM. However, you are using the string "M2:LastRow_M", which makes no sense to Excel. When you put your variable name inside the quotes, it becomes part of a string rather than the value of the variable. You have to build the string using LastRow_M as a number. If you use
"M1:M" & LastRow_M
it will build a string that looks like
M1:M1001
See changes below.
Bookmarks