Q:

Excel vba : Help for Grid lines

I have details from Column A to column M in Sheet 1.
I need to implement Grid lines for the same from Column A to M.
The complication part is, there are 3 different tables in sheet 1 wherein i need to implement Grid lines separately for all those 3 tables based on Used range.
I have macro for the same but it is just working by implementing grid lines altogether for 3 tables. Refer the screenshot for output.
Screenshot

A:

standing your data layout example, you could also use SpecialCells() method of Range object
Dim area As Range

For Each area In ActiveSheet.UsedRange.SpecialCells(XlCellType.xlCellTypeConstants).Areas
    With area.Borders
        .LineStyle = xlContinuous
        .Color = vbBlack
        .Weight = xlThin
    End With
Next

