Exit Sub If The Selection Is Not A Range Of Cells

less than 1 minute read

This code snippet is useful to check if the selection is a range of cells.

If TypeName(Selection) <> "Range" Then Exit Sub