Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows Scott Excel Worksheet Functions 0 December 13th 06 01:25 AM
How do I sort with empty rows between none empty rows? Excel Challenged Excel Worksheet Functions 1 August 17th 06 03:59 PM
Pivot Tables: How do I show ALL field rows, including empty rows?? [email protected] Excel Worksheet Functions 2 April 8th 05 06:21 PM
Macro to select non empty rows in a given range Mario Excel Programming 1 January 23rd 04 07:54 PM
Define Range in Deleting Empty Rows HamishM[_3_] Excel Programming 1 December 19th 03 01:17 AM


All times are GMT +1. The time now is 02:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"