LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Using A Macro To Name A 2-dimensional Range

Maybe something like this will help:

Const LeftCol = 3
Const RightCol = 10
Const NumRows = 30

Dim BottomRow As Long

BottomRow = Cells(Rows.Count, LeftCol).End(xlUp).Row
TopRow = BottomRow - NumRows + 1
Range(Cells(TopRow, LeftCol), Cells(BottomRow, RightCol)).Name = "SomeName"


On Sat, 6 Nov 2004 16:23:10 -0600, Chuckles123
wrote:


This is so easy in a spreadsheet. I want the macro to name a
two-dimensional range: the left-most column and the right-most column
are fixed; the bottom row is the last row of the spreadsheet (but, this
is a variable); the top row is a fixed number of rows above the bottom
row; and, there are some empty cells in the range.

How much harder can it be in a macro???

Thanks for a response.
Chuckles123


 
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
Two dimensional look up 2 D lookup Excel Worksheet Functions 4 September 12th 08 10:25 PM
Transposing from two dimensional to one dimensional VickiMc Excel Worksheet Functions 3 July 17th 08 09:00 AM
One dimensional timescale [email protected] Charts and Charting in Excel 2 January 20th 06 02:19 PM
Three Dimensional Lookup thatzinz Excel Programming 1 May 10th 04 12:09 PM
2 Dimensional Array Tom Ogilvy Excel Programming 0 August 18th 03 08:04 PM


All times are GMT +1. The time now is 12:16 AM.

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"