09/02/25 08:48:28
>>14
VBAって論理式のショートサーキットしないんだっけ?
だとしたらこうかな?1行目の扱いが今ひとつ不明なんでループから出した。
With Worksheets("OutPut")
If .Cells(1, 12) = .Cells(2, 12) Then
.Cells(1, 12).Borders(xlEdgeBottom).LineStyle = xlNone
EndIf
For N = 2 To LastRaw 'LastRaw は最終行
If .Cells(N, 12) = .Cells(N + 1, 12) Then
.Cells(N, 12).Borders(xlEdgeBottom).LineStyle = xlNone
ElseIf .Cells(N, 12) <> .Cells(N - 1, 12) Then
.Rows(N).RowHeight = 80
End If
Next
End With