LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default remove blank rows

I've got a workbook where I'm using code to copy rows of data from one sheet
to a recap sheet if a condition is met (all rows with "Y" in one column).
The data is being copied to sheet two, but blank rows are being left in
between rows where the "Y" condition is not met. My current code is:
'have x start at row 2
x = 2

'loop until a blank row is found
Do While Sheets("Jan 09").Cells(x, 1).Value < ""

If Sheets("Jan 09").Cells(x, 11).Value = "Y" Then
'this will put the value of column 1 "Payable To" in the recap
sheet
Sheets("2009 Recap").Select
Cells(x, 1).Value = Sheets("Jan 09").Cells(x, 1)
End If

'increase the value of x by 1 to act on the next row
x = x + 1

Loop

all assistance is appreciated!
 
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
How to remove rows with the first cell blank Ron de Bruin Excel Programming 1 December 3rd 08 10:21 PM
Need macro to remove blank rows Bob Excel Programming 7 June 21st 06 01:21 PM
formula to remove blank rows Bryan Excel Discussion (Misc queries) 1 January 25th 06 03:52 PM
remove or hide blank rows Erik Beijlen via OfficeKB.com Excel Discussion (Misc queries) 1 February 1st 05 01:17 PM
How do I remove blank rows in Excel? m28leics Excel Discussion (Misc queries) 2 November 29th 04 11:56 PM


All times are GMT +1. The time now is 07:27 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"