加个了条件,感觉难度加大了,只好用SQL来解决了。 参考一下。
select 大区,avg(数量) as 平均,类型 from
(select * from
(select 大区,类型,[1月] as 数量,"1月" as 月份 from [sheet1$a2:l29] union all
select 大区,类型,[2月],"2月" as 月份 from [sheet1$a2:l29] union all
select 大区,类型,[3月],"3月" as 月份 from [sheet1$a2:l29] union all
select 大区,类型,[4月],"4月" as 月份 from [sheet1$a2:l29] union all
select 大区,类型,[5月],"5月" as 月份 from [sheet1$a2:l29] union all
select 大区,类型,[6月],"6月" as 月份 from [sheet1$a2:l29] union all
select 大区,类型,[7月],"7月" as 月份 from [sheet1$a2:l29] ) where 数量 is not null)
group by 大区,类型 |