PDA

View Full Version : [SOLVED] Checking for an Empty Row



outrider
12-02-2004, 01:34 PM
I have a project that needs to check that a row is empty before pasting data.

Example:

If Range("A5:Z5")<>"" Then Entirerow.add
End If

I am new to VBA etc, so any help is appreciated.

Thanks

Zack Barresse
12-02-2004, 01:40 PM
Hello outrider, welcome to the board!


If you are only concerned about row 5, maybe something like this ...


Sub outridertest()
If WorksheetFunction.CountA(Range("A5:Z5")) > 0 Then Range("5:5").Insert
End Sub

Btw, you can use the VBA tags to wrap your code when posting to give it the nice effect above. :yes

outrider
12-03-2004, 05:28 AM
Firefytr.
Thanks for your help, it works great.

Outrider.