Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perhaps:
Sub dural() Selection.Resize(Selection.Rows.Count - 1, Selection.Columns.Count - 2).Select End Sub -- Gary''s Student - gsnu201003 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple problem, simple formula, no FUNCTION ! | Excel Worksheet Functions | |||
Auto reszie a row with wrapped text. | Excel Programming | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
Make it more simple or intuitive to do simple things | Charts and Charting in Excel |