工作中的大难题,求解
因为要做项目工时统计,需要把每人的多个项目和对应工时变成多行,求解大神文件呢?就算没文件,截图带上行列号吧,难道让数一数??? 文件呢?就算没文件,截图带上行列号吧,难道让数一数??? 各位大神,第一次发帖求助,忘了上传文件
各位大神,第一次发帖求助,忘了上传文件
SELECT 姓名,二级部门,[项目_1] as 项目,[人月_1] as 人月 FROM 姓名项目二维表 WHERE [项目_1]!='' AND [人月_1]!='' UNIONSELECT 姓名,二级部门,[项目_2] as 项目,[人月_2] as 人月 FROM 姓名项目二维表 WHERE [项目_2]!='' AND [人月_2]!='' UNIONSELECT 姓名,二级部门,[项目3] as 项目,[人月3] as 人月 FROM 姓名项目二维表 WHERE [项目3]!='' AND [人月3]!='' UNIONSELECT 姓名,二级部门,[项目4] as 项目,[人月4] as 人月 FROM 姓名项目二维表 WHERE [项目4]!='' AND [人月4]!='' UNIONSELECT 姓名,二级部门,[项目5] as 项目,[人月5] as 人月 FROM 姓名项目二维表 WHERE [项目5]!='' AND [人月5]!='' SELECT 姓名,二级部门,[项目_1] as 项目,[人月_1] as 人月 FROM 姓名项目二维表 WHERE [项目_1]!='' AND [人月_1]!='' UNIONSELECT 姓名,二级部门,[项目_2] as 项目,[人月_2] as 人月 FROM 姓名项目二维表 WHERE [项目_2]!='' AND [人月_2]!='' UNIONSELECT 姓名,二级部门,[项目3] as 项目,[人月3] as 人月 FROM 姓名项目二维表 WHERE [项目3]!='' AND [人月3]!='' UNIONSELECT 姓名,二级部门,[项目4] as 项目,[人月4] as 人月 FROM 姓名项目二维表 WHERE [项目4]!='' AND [人月4]!='' UNIONSELECT 姓名,二级部门,[项目5] as 项目,[人月5] as 人月 FROM 姓名项目二维表 WHERE [项目5]!='' AND [人月5]!='' N2:O13=OFFSET(A$1,SMALL(IF(MMULT(N($C$2:$L$4<>""),ROW(1:10)^0)/2>=COLUMN($A:$I),{1;2;3},99),ROW(A1)),)&""
P2:Q13{=OFFSET(C$1,MIN(IF($A$2:$A$4=$N2,{1;2;3},99)),COUNTIF($N$2:$N2,$N2)*2-2)&"" N2:O13=OFFSET(A$1,SMALL(IF(MMULT(N($C$2:$L$4<>""),ROW(1:10)^0)/2>=COLUMN($A:$I),{1;2;3},99),ROW(A1)),)&""
P2:Q13{=OFFSET(C$1,MIN(IF($A$2:$A$4=$N2,{1;2;3},99)),COUNTIF($N$2:$N2,$N2)*2-2)&"" 看看是否可以。公式有点长,希望有大神可以指点是否能优化下。