title: after subtoals need to insert line below them and need to add a top border in excel vba
body: <pre><code>Dim iRange As Range
  Dim iCells As Range
  
  Set iRange = ThisWorkbook.ActiveSheet.UsedRange
  
  For Each iCells In iRange
      'If Not IsEmpty(iCells) Then
      If iCells.SpecialCells(xlFormulas) = True Then
          iCells.BorderAround _
              LineStyle:=xlContinuous, _
              Weight:=xlThin
      End If
  Next iCells
  </code></pre>
  <p><a href="https://i.stack.imgur.com/8djSo.png" rel="nofollow noreferrer">See Excel Image Here</a></p>