ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ignore blank rows (https://www.excelbanter.com/excel-programming/374025-ignore-blank-rows.html)

Geebee

ignore blank rows
 
hi,

I have the following:

Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select

Which basically copies the values from a pivot table. The only problem is
that it is copying a row marked (blank) also.

Here is the data:


t1 359 145 65 30 13 15 19
t2 300 117 64 27 16 21 25
t3 191 73 30 33 12 9 15
t4 278 115 70 25 12 19 32
t5 259 123 54 29 17 17 17
(blank)
Grand ttl 1,387 573 283 144 70 81 108

I want it to copy everything but the row marked (blank). How can I do this?

Thanks in advance,
geebee


Tom Ogilvy

ignore blank rows
 
hide the row marked blank before you copy? Then do
selection.specialcells(xlVisible).copy

--
Regards,
Tom Ogilvy


"geebee" wrote:

hi,

I have the following:

Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select

Which basically copies the values from a pivot table. The only problem is
that it is copying a row marked (blank) also.

Here is the data:


t1 359 145 65 30 13 15 19
t2 300 117 64 27 16 21 25
t3 191 73 30 33 12 9 15
t4 278 115 70 25 12 19 32
t5 259 123 54 29 17 17 17
(blank)
Grand ttl 1,387 573 283 144 70 81 108

I want it to copy everything but the row marked (blank). How can I do this?

Thanks in advance,
geebee



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

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