Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Finding Blanks in list

Try this

Option Explicit

Public Sub Test()

Dim wsSource As Worksheet
Dim wsDest As Worksheet
Dim iRow As Integer
Dim jRow As Integer

Set wsSource = Worksheets("Source")
Set wsDest = Worksheets("Dest")

iRow = 0
jRow = 0
Do While Not IsEmpty(wsSource.Range("A1").Offset(iRow, 0))
If IsEmpty(wsSource.Range("A1").Offset(iRow, 1)) Then
iRow = iRow + 1
jRow = jRow + 1
wsSource.Rows(iRow).Copy (wsDest.Rows(jRow))
ElseIf IsEmpty(wsSource.Range("A1").Offset(iRow, 2)) Then
iRow = iRow + 1
jRow = jRow + 1
wsSource.Rows(iRow).Copy (wsDest.Rows(jRow))
Else
iRow = iRow + 1
End If
Loop

End Sub




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Finding MIN across worksheets while excluding blanks Alison Excel Worksheet Functions 2 November 23rd 08 08:47 PM
Help with sorting blanks out of a list Susienak Excel Discussion (Misc queries) 3 November 17th 07 07:53 AM
Condense out blanks in a list Matt Excel Discussion (Misc queries) 3 July 31st 07 01:00 AM
validation list blanks Wes Excel Worksheet Functions 2 March 6th 05 08:01 PM
Finding blanks in dynamic ranges Ken McLennan[_3_] Excel Programming 2 February 25th 04 09:19 AM


All times are GMT +1. The time now is 08:13 PM.

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"