Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Expend Range Using Macro

I would like to use macro to auto select my range of data, say A1:M50
which is expendable or contractible.

What command should I include in the macro?

Many thank

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Expend Range Using Macro

Something like this ? ...........

'-----------------------------------------
Sub test()
Dim MyRange As Range
Dim Rw1 As Long
Dim Col1 As Integer
Dim Rw2 As Long
Dim Col2 As Integer
'--------------------------
Rw1 = 1 ' Row 1
Col1 = 1 ' Column 1
Rw2 = 50 ' Row 50
Col2 = 13 'Column M
Set MyRange = ActiveSheet.Range(Cells(Rw1, Col1), Cells(Rw2
Col2))
MyRange.Select

End Sub
'----------------------------------------

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Expend Range Using Macro

Thanks BrianB for the help, but it does not seems to work for me, mayb
I did posted my problems incorrectly or not clearly.

What I actually want is if the range is to be expended to A1:M70 fro
A1:M50, the macro will automatically select the new range

--
Message posted from http://www.ExcelForum.com

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
Sub Macro vrs Function Macro Auto Start Pat Excel Discussion (Misc queries) 7 June 6th 07 09:53 PM
Auto Range Select C Brandt Excel Discussion (Misc queries) 1 May 21st 07 09:29 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
In VB, get Auto Filter Range Michael Kintner Excel Programming 1 November 24th 03 07:07 PM
Macro to input formula in range based on another range Peter Atherton Excel Programming 0 October 9th 03 12:47 AM


All times are GMT +1. The time now is 01:17 AM.

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

About Us

"It's about Microsoft Excel"