ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy non blank rows only (https://www.excelbanter.com/excel-programming/426433-copy-non-blank-rows-only.html)

mathel

Copy non blank rows only
 
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

Don Guillett

Copy non blank rows only
 
As ALWAYS, post your code for comments. You may want to use
datafilterautofilter on the non blankscopy/paste

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mathel" wrote in message
...
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



mathel

Copy non blank rows only
 
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
datafilterautofilter on the non blankscopy/paste

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mathel" wrote in message
...
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





All times are GMT +1. The time now is 04:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com