HOW are they selected?
You will not need a specific selection if you have to calculate the average for a contiguous range where part of the cells are blank (completely empty) or contain text. Average will compute SUM(Range)/COUNT(Range) and both these functions simply ignore text and blank cells as well. If you want to skip cells containing numbers you have to pass a list of contiguous subranges to AVERAGE(). First you should consider if yor sheet was well designed in this case (avoid complications).
Maybe the functions:
AVERAGEIF(range;criteria;average_range)
or
AVERAGEIFS(average_range;range1;criteria1;…;rangeN;criteriaN)
but without know how your data are disposed?.