ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Ranges (https://www.excelbanter.com/excel-programming/376587-ranges.html)

JOUIOUI

Ranges
 
I'm new to using ranges so any help you can provide is appreciated. Here is
the string of cells I'm looking to copy to another workbook, but only if the
cells in col B are populated. This is not working,

Set rng = .Range("B20:B57", "82", "B85", "B86").SpecialCells(xlConstants,
xlNumbers)
Set rng1 = Intersect(rng.EntireRow, .Columns(1))
Set rng2 = Intersect(rng.EntireRow, .Columns(2))


Gary''s Student

Ranges
 
??82??
--
Gary''s Student


"JOUIOUI" wrote:

I'm new to using ranges so any help you can provide is appreciated. Here is
the string of cells I'm looking to copy to another workbook, but only if the
cells in col B are populated. This is not working,

Set rng = .Range("B20:B57", "82", "B85", "B86").SpecialCells(xlConstants,
xlNumbers)
Set rng1 = Intersect(rng.EntireRow, .Columns(1))
Set rng2 = Intersect(rng.EntireRow, .Columns(2))


JOUIOUI

Ranges
 
oops B82

"Gary''s Student" wrote:

??82??
--
Gary''s Student


"JOUIOUI" wrote:

I'm new to using ranges so any help you can provide is appreciated. Here is
the string of cells I'm looking to copy to another workbook, but only if the
cells in col B are populated. This is not working,

Set rng = .Range("B20:B57", "82", "B85", "B86").SpecialCells(xlConstants,
xlNumbers)
Set rng1 = Intersect(rng.EntireRow, .Columns(1))
Set rng2 = Intersect(rng.EntireRow, .Columns(2))



All times are GMT +1. The time now is 10:58 PM.

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