Hello dear,
My code is to remove border from empty cell which is working fine.
Dim ismycellempty As Boolean
ismycellempty = IsEmpty(Range("BG11"))
If ismycellempty = True Then
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Else
MsgBox ("no cell empty")
End If
How can i use same code in loop. I wish to use it from Range "BG11 to BG49"
My code is to remove border from empty cell which is working fine.
Dim ismycellempty As Boolean
ismycellempty = IsEmpty(Range("BG11"))
If ismycellempty = True Then
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Else
MsgBox ("no cell empty")
End If
How can i use same code in loop. I wish to use it from Range "BG11 to BG49"