+ Reply to Thread
Results 1 to 2 of 2

empty rows in range

  1. #1
    רוזנט
    Guest

    empty rows in range

    i want a code like this

    if any row (part of row) in range XX is empty then
    do yy....

    thank you
    rozent

  2. #2
    Dave Peterson
    Guest

    Re: empty rows in range

    Dim myRng as range
    dim myRow as range
    dim delRng as range

    set myrng = activesheet.range("a1:x99")

    for each myrow in myrng.rows
    if application.counta(myrow) <> myrow.cells.count then
    'at least one really empty cell.
    'do what you want
    'if you're deleting
    if delrng is nothing then
    set delrng = myrow.cells(1)
    else
    set delrng = union(delrng,myrow.cells(1))
    end if
    end if
    next myrow

    if delrng is nothing then
    'do nothing
    else
    delrng.entirerow.delete
    end if

    ????? wrote:
    >
    > i want a code like this
    >
    > if any row (part of row) in range XX is empty then
    > do yy....
    >
    > thank you
    > rozent


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1