Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default simple reszie


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default simple reszie

Perhaps:

Sub dural()
Selection.Resize(Selection.Rows.Count - 1, Selection.Columns.Count - 2).Select
End Sub
--
Gary''s Student - gsnu201003
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default simple reszie

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default simple reszie

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
Auto reszie a row with wrapped text. Timothy Marks Excel Programming 5 January 12th 06 09:12 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Make it more simple or intuitive to do simple things Vernie Charts and Charting in Excel 1 March 16th 05 04:01 AM


All times are GMT +1. The time now is 01:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"