excel - related to article Get a subrange that has all the cells of a range except of a range of -
hi want create subrange excludes rows range lets 2nd , 3rd row. have seen answers on site of how can realize that,
set rng = range("b5:h20") set subrng=rng.offset(1).resize(rng.rows.count-1)
or
set subrng = intersect(rng.offset(1), rng)
but because beginner not know script goes above , underneath commands can compatible vba , make related worksheet.so have on that.
thank much
hide cells not want include if attempting reverse-union. use range.specialcells method visible cells.
dim long, arr variant, r range, rng range arr = array(2, 3) = lbound(arr) ubound(arr) range("b5:h20").rows(arr(a)).entirerow.hidden = true next set rng = range("b5:h20").specialcells(xlcelltypevisible) range("b5:h20").entirerow.hidden = false debug.print rng.address(0,0)
Comments
Post a Comment