This is working perfect. :-) Thank you soo much sgh
But there is just one problem, I need to cutomise this for every different set of tables. For the one I'm working on now it should find 7 blank cells and also the rage to copy is different. I did it in this way, but now it gives me this error: "Subscript out of range"
Sub FormatTable()
Dim cell As Range
For Each cell In Sheets("Sheet1").Range("A2", Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp))
If IsEmpty(cell.Value) And _
IsEmpty(cell.Offset(1, 0).Value) And _
IsEmpty(cell.Offset(2, 0).Value) And _
IsEmpty(cell.Offset(3, 0).Value) And _
IsEmpty(cell.Offset(4, 0).Value) And _
IsEmpty(cell.Offset(5, 0).Value) And _
IsEmpty(cell.Offset(6, 0).Value) Then
Range("A1:Z3").Copy Destination:=cell.Offset(1)
cell.Offset(-1, 0).Font.Bold = True
With cell.Offset(8, 0).CurrentRegion.Borders
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End If
Next cell
End Sub
What can be the problem?
Thanks a lot
Bookmarks