Prev: Run Code in Another Workbook
Next: Macro to populate cell value from another sheet based upon the data validation list selection
From: Rick Rothstein on 12 Nov 2009 19:47 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. -- Rick (MVP - Excel) "Peter T" <peter_t(a)discussions> wrote in message news:%23F2AsnxYKHA.2164(a)TK2MSFTNGP02.phx.gbl... > 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 > > "Rick Rothstein" <rick.newsNO.SPAM(a)NO.SPAMverizon.net> wrote in message > news:eg7%23sHwYKHA.4140(a)TK2MSFTNGP05.phx.gbl... >> You can shorten that slightly by leaving the Cells references out... >> >> Set rngCur = .Rows(2 & ":" & .Count) >> >> -- >> Rick (MVP - Excel) >> >> >> "John_John" <JohnJohn(a)discussions.microsoft.com> wrote in message >> news:37838F7D-4262-4C32-A913-AC4EC872987F(a)microsoft.com... >>> Hi! >>> One way is below: >>> >>> With rngCur >>> Set rngCur = .Rows(2 & ":" & .Cells.Count) >>> End With >>> >>> ..but is not the only one! >>> >>> ? ??????? "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 >>>> -- >>>> Gary''s Student - gsnu200908 >> > > |