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:
but without know how your data are disposed?.