Prev: simple resize
Next: The last day
From: MikeF on 31 May 2010 14:45 Would like to take a range and resize it by 2 columns less on the right and one column less on the bottom. Any assistance will be greatly appreciated. Thanx. -Mike
From: Gary''s Student on 31 May 2010 14:52 Perhaps: Sub dural() Selection.Resize(Selection.Rows.Count - 1, Selection.Columns.Count - 2).Select End Sub -- Gary''s Student - gsnu201003
From: Per Jessen on 31 May 2010 15:00 Hi Mike It is not much information you give us to work with. In my example, the selected range, will be reduced by 1 row and by two columns: Sub ResizeRng() Dim rng As Range Set rng = Selection Set rng = rng.Resize(rng.Rows.Count - 1, rng.Columns.Count - 2) rng.Select End Sub Regards, Per On 31 Maj, 20:45, MikeF <Mi...(a)discussions.microsoft.com> wrote: > Would like to take a range and resize it by 2 columns less on the right and > one column less on the bottom. > > Any assistance will be greatly appreciated. > Thanx. > > -Mike
From: Wouter HM on 31 May 2010 15:04 Hi Mike, In Excel 2003 I have created this: Sub Min1Row2Cols() Dim rngMine As Range Dim lngRow As Long Dim lngCol As Long If Selection.Rows.Count > 1 And _ Selection.Columns.Count > 2 Then lngRow = Selection.Rows.Count - 1 lngCol = Selection.Columns.Count - 2 Set rngMine = Range(Selection.Cells(1, 1), _ Selection.Cells(lngRow, lngCol)) rngMine.Select End If End Sub HTH Wouter
|
Pages: 1 Prev: simple resize Next: The last day |