Consulting

Results 1 to 3 of 3

Thread: Checking for an Empty Row

  1. #1
    VBAX Regular
    Joined
    Dec 2004
    Posts
    26
    Location

    Checking for an Empty Row

    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

  2. #2
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    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.

  3. #3
    VBAX Regular
    Joined
    Dec 2004
    Posts
    26
    Location
    Firefytr.
    Thanks for your help, it works great.

    Outrider.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •