百合・百合子バグ修正 Sub Macro1() rr = Cells(Rows.Count, 1).End(xlUp).Row For r = 1 To rr n = Cells(r, 1) s = Cells(r, 2) t = "・" & s & "・" For i = 1 To r - 1 If Cells(i, 1) = n Then w = Cells(i, 2) If InStr(t, "・" & w & "・") = 0 Then t = t & w & "・" End If End If Next t = t & s & "・" For i = r + 1 To rr If Cells(i, 1) = n Then w = Cells(i, 2) If InStr(t, "・" & w & "・") = 0 Then t = t & w & "・" End If End If Next t = Left(t, Len(t) - 1) t = Right(t, Len(t) - Len(s) - 2) Cells(r, 3) = t Next End Sub