I have a feature class with over 5000 points. There are too many to label so I would like to be able to grab the first, the last and every 30th or 50th in between.
If you're using ArcMap, you can use a SQL query to select a subset of features to label, as long as you have the "Define classes of features and label each class differently" method selected (rather than "Label all features the same way").
To display the labels for the first record and every nth one after that, you'll have to create a class with a SQL query like this:
MOD("OBJECTID"-1, n) = 0, where
n is replaced by the number of features you want to skip, and
"OBJECTID" is the name of the OID field of your data. The
-1 is what ensures the first record is displayed, since the OID field typically starts numbering at 1, not 0.
I'm not sure how you'd ensure the last record gets labeled in addition to these, though.
Edit: I suppose a hack-y way to include the last record would be to add an
OR "OBJECTID" = m to the end of the expression, where you figure out what
m should be by selecting "OBJECTID" in the field list and clicking "Get Unique Values", then scrolling to the bottom and seeing what the maximum value is. Obviously, this would have to be done separately for each layer you're trying to label this way.