Dim t As Table = Tables("A")
t.sort = "日期"
Dim ym As String = format(t.rows(0)("日期"),"yyyy-MM")
Dim str As String = ym & "(" & t.rows(0)("日期").day & ","
For i As Integer = 1 To t.rows.count - 1
If ym = format(t.rows(i)("日期"),"yyyy-MM")Then
str = str & t.rows(i)("日期").day & ","
Else
ym = format(t.rows(i)("日期"),"yyyy-MM"
str = str.trim(",") & ")," & ym & "("& t.rows(i)("日期").day & ","
End If
Next
str = str.Trim(",") & ")"
msgbox(str)