Excel VBA Macro Generator — illustrative example INPUT Excel desktop VBA. The macro is stored in the target workbook. Worksheet name: Orders. Format only A1:D1 in bold. No other formatting changes. RESULT Sub FormatOrdersHeader() Dim target As Worksheet Set target = ThisWorkbook.Worksheets("Orders") target.Range("A1:D1").Font.Bold = True End Sub Scope: the workbook containing the macro, Orders!A1:D1. A missing Orders sheet causes an error before formatting. Test in a copy; no Excel execution is claimed. REVIEW A macro should state the workbook assumptions and affected range. Avoid broad deletion or formatting changes without an explicit boundary. This is a teaching example, not a live execution record.