ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 Excel Home精品图文教程库
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
300集Office 2010微视频教程 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 1229|回复: 4

[求助] 这种考勤数据处理,PQ还是VBA

[复制链接]

TA的精华主题

TA的得分主题

发表于 2021-5-10 11:31 | 显示全部楼层 |阅读模式
数据处理,有点类似透视表处理,但是学艺不精还不会
把明细里面的考勤整成表二(整理)类型
公式会遇到 如:陈达波 2021/4/1只有一次卡,下午的没办法引用
公式能优化这个问题,但这个表就会卡死了
精简公式?PQ?VBA?
image.jpg

新建 XLS 工作表.rar

94.59 KB, 下载次数: 25

TA的精华主题

TA的得分主题

发表于 2021-5-10 13:30 来自手机 | 显示全部楼层
本帖最后由 zpy2 于 2021-5-10 13:40 编辑

select 星期,考勤日期,group_concat(distinct(case when 列标签='陈玉霞' then 数据 else null end)) as '陈玉霞',group_concat(distinct(case when 列标签='刘琴妹' then 数据 else null end)) as '刘琴妹',group_concat(distinct(case when 列标签='洪淑端' then 数据 else null end)) as '洪淑端',group_concat(distinct(case when 列标签='林国强' then 数据 else null end)) as '林国强',group_concat(distinct(case when 列标签='杨和春' then 数据 else null end)) as '杨和春',group_concat(distinct(case when 列标签='余建明' then 数据 else null end)) as '余建明',group_concat(distinct(case when 列标签='陈达波' then 数据 else null end)) as '陈达波',group_concat(distinct(case when 列标签='黄健' then 数据 else null end)) as '黄健',group_concat(distinct(case when 列标签='杨福云' then 数据 else null end)) as '杨福云',group_concat(distinct(case when 列标签='郑明川' then 数据 else null end)) as '郑明川',group_concat(distinct(case when 列标签='彭湖滨' then 数据 else null end)) as '彭湖滨',group_concat(distinct(case when 列标签='杨蜀虎' then 数据 else null end)) as '杨蜀虎',group_concat(distinct(case when 列标签='胡斌' then 数据 else null end)) as '胡斌',group_concat(distinct(case when 列标签='曹琦' then 数据 else null end)) as '曹琦',group_concat(distinct(case when 列标签='陈海林' then 数据 else null end)) as '陈海林',group_concat(distinct(case when 列标签='肖丽娟' then 数据 else null end)) as '肖丽娟',group_concat(distinct(case when 列标签='向坚' then 数据 else null end)) as '向坚',group_concat(distinct(case when 列标签='黄发娥' then 数据 else null end)) as '黄发娥',group_concat(distinct(case when 列标签='陈惠真' then 数据 else null end)) as '陈惠真',group_concat(distinct(case when 列标签='陈国卿' then 数据 else null end)) as '陈国卿',group_concat(distinct(case when 列标签='肖韵' then 数据 else null end)) as '肖韵',group_concat(distinct(case when 列标签='王任远' then 数据 else null end)) as '王任远',group_concat(distinct(case when 列标签='魏晨思' then 数据 else null end)) as '魏晨思',group_concat(distinct(case when 列标签='曾志文' then 数据 else null end)) as '曾志文',group_concat(distinct(case when 列标签='郑丽旻' then 数据 else null end)) as '郑丽旻',group_concat(distinct(case when 列标签='林温馨' then 数据 else null end)) as '林温馨',group_concat(distinct(case when 列标签='刘彬媚' then 数据 else null end)) as '刘彬媚',group_concat(distinct(case when 列标签='石家福' then 数据 else null end)) as '石家福',group_concat(distinct(case when 列标签='叶佳佳' then 数据 else null end)) as '叶佳佳',group_concat(distinct(case when 列标签='陈炉星' then 数据 else null end)) as '陈炉星',group_concat(distinct(case when 列标签='吴咏芝' then 数据 else null end)) as '吴咏芝' from (select 星期,考勤日期,列标签,group_concat(数据,'、') 数据 from input group by 星期,考勤日期,列标签) group by 星期,考勤日期


数据的确不少
SRC_20210510_132803.png

鍦ㄧ嚎sql (2).mhtml.zip

9.83 KB, 下载次数: 12

TA的精华主题

TA的得分主题

 楼主| 发表于 2021-5-10 14:27 | 显示全部楼层
zpy2 发表于 2021-5-10 13:30
select 星期,考勤日期,group_concat(distinct(case when 列标签='陈玉霞' then 数据 else null end)) as ' ...

多谢回复
算了,不搞了,

TA的精华主题

TA的得分主题

发表于 2021-5-10 16:24 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
下载学习,非常感谢分享。

TA的精华主题

TA的得分主题

发表于 2021-5-10 17:30 来自手机 | 显示全部楼层
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-3-29 01:43 , Processed in 0.034386 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表