![]() |
union method for non-adjacent ranges
Use Set with Union if you want to create a range. You might dim acd and bef
as ranges to faciliate your work. It's best to use the specific data type rather than a variant or object if possible. Whether this gives you the result you want I don't know. Dim a, b, cd, ef, acd, bef As Variant This only dims bef as variant directly. The others are variants too but only because it is the default data type. VB is not like C; you have to "as" each variable. -- Jim Rech Excel MVP |
All times are GMT +1. The time now is 05:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com