PC Review


Reply
Thread Tools Rate Thread

Copy non blank rows only

 
 
mathel
Guest
Posts: n/a
 
      2nd Apr 2009
I'm working with Excel 2003. In a workbook I have Range A50:H51 and I need
to copy only the row that has data into another workbook (both rows could
have data or only one of the twol). The way my macro is running now, it
copies the entire range and will leave a blank row in the other workbook.

I am hoping someone can help with code to correct this problem.

Thanks!
--
Linda
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      2nd Apr 2009
As ALWAYS, post your code for comments. You may want to use
data>filter>autofilter on the non blanks>copy/paste

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"mathel" <(E-Mail Removed)> wrote in message
news:1567D58D-14F8-460F-AE3E-(E-Mail Removed)...
> I'm working with Excel 2003. In a workbook I have Range A50:H51 and I
> need
> to copy only the row that has data into another workbook (both rows could
> have data or only one of the twol). The way my macro is running now, it
> copies the entire range and will leave a blank row in the other workbook.
>
> I am hoping someone can help with code to correct this problem.
>
> Thanks!
> --
> Linda


 
Reply With Quote
 
mathel
Guest
Posts: n/a
 
      2nd Apr 2009
The data Range A51:H52 has already been copied from another range to remove
formulas (Paste Special). I tried Auto Filter, Advanced Filter, etc.,
however, if row 51 is blank, I still get the blank row. In my original code,
I was sorting the data so the blank row would be at the bottom, however, as
it will not filter, or when copied to the other workbook and if I use
End/Down and it skips the blank row, I have to assume Excel sees something in
the cell.
--
Linda


"Don Guillett" wrote:

> As ALWAYS, post your code for comments. You may want to use
> data>filter>autofilter on the non blanks>copy/paste
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "mathel" <(E-Mail Removed)> wrote in message
> news:1567D58D-14F8-460F-AE3E-(E-Mail Removed)...
> > I'm working with Excel 2003. In a workbook I have Range A50:H51 and I
> > need
> > to copy only the row that has data into another workbook (both rows could
> > have data or only one of the twol). The way my macro is running now, it
> > copies the entire range and will leave a blank row in the other workbook.
> >
> > I am hoping someone can help with code to correct this problem.
> >
> > Thanks!
> > --
> > Linda

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy several row headers to rows (blank) below for each header Rechie Microsoft Excel Misc 1 26th Oct 2009 02:27 PM
Copy Range but Skip blank rows Q Sean Windows XP General 3 27th Jun 2007 09:55 AM
Copy rows of data (eliminating blank rows) from fixed layout =?Utf-8?B?U3dlZXBlYQ==?= Microsoft Excel Misc 1 13th Mar 2007 11:05 PM
Copy rows, but exclude blank rows Mary Microsoft Excel Programming 1 1st Nov 2005 07:21 AM
How to copy non-blank rows from one sheet to another? =?Utf-8?B?dHdvZml2ZXBpZQ==?= Microsoft Excel Programming 2 3rd Dec 2004 02:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:28 AM.