You can now use Ablestar Bulk Product Editor to bulk edit products based on their profit margin. All you need to do is use the 'Profit Margin' filter to select the variants that you need:
If the cost of a variant is blank it will not have a profit margin but you can also select those variants by searching for products where the profit margin 'is empty/blank'.
Learn more about searching for products to bulk edit.