or download this
Set RangeofChard = Union(Range(Cells(ChardRowStart, 1), Cells(ChardRow
+End, 1)), _
Range(Cells(ChardRowStart, UsedCol), Cells(Ch
+ardRowEnd, UsedCol)), _
Range(Cells(ChardRowStart, MaintCol), Cells(C
+hardRowEnd, MaintCol)), _
Range(Cells(ChardRowStart, OtherUsedCol), Cel
+ls(ChardRowEnd, OtherUsedCol)))
or download this
my $Range = $currentsheet->Union($currentsheet->Range($currentsheet->C
+ells($HeaderRow, 1), $currentsheet->Cells($ToIndex, 1)),
$currentsheet->Range($currentsheet->Cells($He
+aderRow, $UsedCol), $currentsheet->Cells($ToIndex, $UsedCol)),
$currentsheet->Range($currentsheet->Cells($He
+aderRow, $MaintCol), $currentsheet->Cells($ToIndex, $MaintCol)),
$currentsheet->Range($currentsheet->Cells($He
+aderRow, $OtherUsedCol), $currentsheet->Cells($ToIndex, $OtherUsedCol
+)));
print "$Range\n";