Cell D39 has the formula

=(D4+D11+D18+D25+D32)/5

I want the cell to remain blank until at least on variable is entered, but then I want it to calculate the average of only the cells that have a variable in them.

Just so I am clear

D4 = 20

D11 = 50

D 18 = BLANK

D25 = BLANK

D32 = BLANK

Average would be 35

Thanks