|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
把上下半年的数据源表去掉合并单元格,然后引入外部查询,sql语句如下:
select 指标,项目,行次,"上半年" as 时间,"一公司" as 公司,一公司 as 值 from [上半年$a1:g27] union all
select 指标,项目,行次,"上半年","二公司",二公司 from [上半年$a1:g27] union all
select 指标,项目,行次,"上半年","三公司",三公司 from [上半年$a1:g27] union all
select 指标,项目,行次,"上半年","四公司",四公司 from [上半年$a1:g27] union all
select 指标,项目,行次,"下半年","一公司",一公司 from [下半年$a1:g27] union all
select 指标,项目,行次,"下半年","二公司",二公司 from [下半年$a1:g27] union all
select 指标,项目,行次,"下半年","三公司",三公司 from [下半年$a1:g27] union all
select 指标,项目,行次,"下半年","四公司",四公司 from [下半年$a1:g27]
[ 本帖最后由 抹香鲸2009 于 2010-7-19 22:36 编辑 ] |
|