阅: 243 | 回: 1
发表于2024/11/6 15:34:38
楼主
等级:初学者
- 积分:0
- 财富值:2.0
- 身份:普通用户
请问一下,表中按字段汇总怎么操作?
原来是我是用宏实现的,以下是我原来的命令。
strSQL = "select " & [a5] & "," & [b5] & "," & [c5] & "," & [d5] & ",sum(" & [e5] & "),sum(" & [f5] & "),sum(" & [g5] & "),sum(" & [h5] & ") from [数据源$A2:ak20000] group by " & [a5] & "," & [b5] & "," & [c5] & "," & [d5] & " having " & [a1] & " ='" & [A2] & "' and (" & [a3] & " in('" & [a4] & "','" & [b4] & "','" & [c4] & "','" & [d4] & "','" & [e4] & "','" & [f4] & "','" & [g4] & "','" & [h4] & "'))ORDER BY " & [a5] & "," & [b5] & "," & [c5] & "," & [d5] & ",sum(" & [e5] & "),sum(" & [f5] & "),sum(" & [g5] & "),sum(" & [h5] & ")DESC"
我的个性签名