Redefine a Range

  • Thread starter Thread starter Gary''s Student
  • Start date Start date
G

Gary''s Student

I am given a range which is part of a single column, say D31:D257
I need an easy way to clip off the top cell, leaving D32:D257

Thanks in Advance
 
There is always this way...

Set R = Range("D31:D257")
Set R = R.Offset(1).Resize(R.Rows.Count-1)
 
Here is another method for you to choose from (which I kind of like for its
brevity)...

Set R = Range("D31:D257")
Set R = Range(R(2), R(R.Count))
 
Hi!
One way is below:

With rngCur
Set rngCur = .Rows(2 & ":" & .Cells.Count)
End With

...but is not the only one!

Ο χÏήστης "Gary''s Student" έγγÏαψε:
 
Thanks!
--
Gary''s Student - gsnu200908


John_John said:
Hi!
One way is below:

With rngCur
Set rngCur = .Rows(2 & ":" & .Cells.Count)
End With

..but is not the only one!

Ο χÏήστης "Gary''s Student" έγγÏαψε:
 
Thanks!
--
Gary''s Student - gsnu200908


Rick Rothstein said:
Here is another method for you to choose from (which I kind of like for its
brevity)...

Set R = Range("D31:D257")
Set R = Range(R(2), R(R.Count))

--
Rick (MVP - Excel)




.
 
You can shorten that slightly by leaving the Cells references out...

Set rngCur = .Rows(2 & ":" & .Count)
 
You are welcome. Just to add to the idea that "there is always more than one
way to skin a cat", here is yet another way to do it...

Set R = Range("D31:D257")
Set R = Intersect(R, R.Offset(1))
 
normally you can, but not always, eg

Set rngCur = Columns(1)
With rngCur
Debug.Print .Rows(2 & ":" & .Count).Address
Debug.Print .Rows(2 & ":" & .Cells.Count).Address
End With

Regards,
Peter T
 
One more way:

With Range("D31:D257")
.Cut .Offset(1)
End With

Ο χÏήστης "Rick Rothstein" έγγÏαψε:
 
I assumed the when Gary''s Student included this line as part of the
description...

"I am given a range which is part of a single column"

that he was ruling out the possibility of an entire column being selected.
 
Back
Top