Code:
[FONT=Times New Roman][SIZE=3]Sub DelRows()
Dim Variant As Range[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Set Variant = Range("B172:B201")[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]On Error GoTo GetOut
Variant.SpecialCells(xlCellTypeBlanks).Select
On Error GoTo 0
If Selection.Count = <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:PlaceName w:st="on">Variant.Count</st1:PlaceName> <st1:PlaceName w:st="on">Then</st1:PlaceName> 'All cells were blank
<st1:PlaceType w:st="on">Range</st1:PlaceType>("171:209").EntireRow.Delete
Else
Selection.EntireRow.Delete
End If
GetOut:
'No blank cells[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]End Sub[/SIZE][/FONT]
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
The macro I am using is above. Presently it checks range B172: B201 for data. If it finds data it does nothing. However if it does not find data it deletes the rows in range 171:209. Instead of deleting the rows in range 171:209, I would like to add asterisks to the rows in range B171:B209 but I am not sure how to change the code so that it can do that, would you be able to help me?