I have a project that needs to check that a row is empty before pasting data.
Example:
I am new to VBA etc, so any help is appreciated.If Range("A5:Z5")<>"" Then Entirerow.add End If
Thanks
I have a project that needs to check that a row is empty before pasting data.
Example:
I am new to VBA etc, so any help is appreciated.If Range("A5:Z5")<>"" Then Entirerow.add End If
Thanks
Hello outrider, welcome to the board!
If you are only concerned about row 5, maybe something like this ...
Btw, you can use the VBA tags to wrap your code when posting to give it the nice effect above.Sub outridertest() If WorksheetFunction.CountA(Range("A5:Z5")) > 0 Then Range("5:5").Insert End Sub
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables
Firefytr.
Thanks for your help, it works great.
Outrider.