关键是数据结构,如下图:
1、在D5单元格输入公式:
=IF(C5="","",IF(C5<=$B$2,IF(C5<0.95*$E$2,"无效","有效"),"无效"))
复制并下拉至D29单元格
2、在E2单元格输入公式:
=IF(SUM(C5:C29)=0,0,AVERAGE(C5:C29))
3、在D1单元格输入公式:
=AVERAGEIF(D5:D29,"有效",C5:C29)
最后,就是你在B、C列输入单位和报价,即可实现自动核算基准价了……
D4单元格写公式:
=AVERAGEIFS(C5:Cn,"<="&最高限价所在单元格,C5:Cn,">="&AVERAGEIF(C5:Cn,"<="&最高限价所在单元格)*1.05)
n为你最后一行数据的Excel行号。