Sub 点線付け() endr = Cells(10000, 1).End(xlUp).Row For i = 2 To endr If Cells(i, 2) <> "" Then 'B列に数値あり行が実行対象 sen1 = "--------------------------------------------------------------------------" suu1 = Len(Cells(i, 1)) Cells(i, 1) = Cells(i, 1) & sen1 End If Next End Sub Sub 点線削除() endr = Cells(10000, 1).End(xlUp).Row For i = 2 To endr If Cells(i, 2) <> "" Then sut = InStr(1, Cells(i, 1), "-") If sut > 0 Then ddd = Left(Cells(i, 1), sut - 1) Cells(i, 1) = ddd End If End If Next End Sub |