表形式の具体例を必ず書いてください。
仮に以下のような元データの場合。
元データ
A B C
1 名前 個数 金額
2 あ 10 1000
3 い 20 1100
4 う 30 1200
5 え 40 1300
6 あ 10 1400
7 い 20 1500
8 う 30 1600
9 え 40 1700
10 け 50 1800
ピボットテーブル
A B C D
3 名前 個数 / 個数 合計 / 個数 合計 / 金額
4 あ 2 20 2400
5 い 2 40 2600
6 う 2 60 2800
7 え 2 80 3000
8 け 1 50 1800
集計フィールドの結果を文字列にすることはできないと思うので、無理です。
ただしPowerQueryなら可能かもしれません。
データ→テーブルまたは範囲から でPowerQueryで読み込み、詳細エディターを開いて
let
ソース = Excel.CurrentWorkbook(){[Name="テーブル1"]}[Content],
変更された型 = Table.TransformColumnTypes(ソース,{{"名前", type text}, {"個数", Int64.Type}, {"金額", Int64.Type}})
in
変更された型
のようになっていたら、以下のように変更して完了・閉じて読み込む。
let
ソース = Excel.CurrentWorkbook(){[Name="テーブル1"]}[Content],
変更された型 = Table.TransformColumnTypes(ソース,{{"名前", type text}, {"個数", Int64.Type}, {"金額", Int64.Type}}),
Grp = Table.Group(変更された型, {"名前"}, {
{"件数", each Table.RowCount(Table.Distinct(_)), Int64.Type},
{"個数合計", each List.Sum([個数]), type nullable number},
{"金額合計", each List.Sum([金額]), type nullable number}}),
Add = Table.AddColumn(Grp, "件数個数計", each Text.Combine({Text.From([件数]), "件", Text.From([個数合計]), "個"}), type text)
in
Add
A B C D E
1 名前 件数 個数合計 金額合計 件数個数計
2 あ 2 20 2400 2件20個
3 い 2 40 2600 2件40個
4 う 2 60 2800 2件60個
5 え 2 80 3000 2件80個
6 け 1 50 1800 1件50個