Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Post my named ranges in column A

Hi Howard,

Am Fri, 25 Jul 2014 04:14:29 -0700 (PDT) schrieb L. Howard:

GEN, COMM, MAJ etc. are dynamic named ranges on sheet 1, Workbook in scope.
Refers To formula looks like this:

=OFFSET(Sheet1!$T$2,0,0,COUNTA(Sheet1!$T$2:$T$50), 1)


you have to add your other range names. I only defined 3 of them:

Sub RankArray()

Dim Rank_array As Variant, arrOut As Variant
Dim Rank_Str As String
Dim i As Long
Dim dest As Range

Rank_Str = "GEN, COMM, MAJ"
Rank_array = Split(Rank_Str, ", ")

For i = LBound(Rank_array) To UBound(Rank_array)
Set dest = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(2, 0)
arrOut = Range(Rank_array(i))
dest.Resize(rowsize:=UBound(arrOut)) = arrOut
Next 'i

End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Post my named ranges in column A

On Friday, July 25, 2014 4:42:02 AM UTC-7, Claus Busch wrote:
Hi Howard,



Am Fri, 25 Jul 2014 04:14:29 -0700 (PDT) schrieb L. Howard:



GEN, COMM, MAJ etc. are dynamic named ranges on sheet 1, Workbook in scope.


Refers To formula looks like this:




=OFFSET(Sheet1!$T$2,0,0,COUNTA(Sheet1!$T$2:$T$50), 1)




you have to add your other range names. I only defined 3 of them:



Sub RankArray()



Dim Rank_array As Variant, arrOut As Variant

Dim Rank_Str As String

Dim i As Long

Dim dest As Range



Rank_Str = "GEN, COMM, MAJ"

Rank_array = Split(Rank_Str, ", ")



For i = LBound(Rank_array) To UBound(Rank_array)

Set dest = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(2, 0)

arrOut = Range(Rank_array(i))

dest.Resize(rowsize:=UBound(arrOut)) = arrOut

Next 'i



End Sub





Regards

Claus B.

--

Vista Ultimate / Windows7

Office 2007 Ultimate / 2010 Professional


Thanks Claus, that now looks familiar.

Works good.

Appreciate it.

Regards,
Howard
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
Create named ranges in Column on worksheet eholz1 Excel Programming 0 January 24th 08 01:41 AM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Excel Programming 3 December 24th 07 01:15 PM
Multiple Named Ranges in the Same Column David Excel Worksheet Functions 2 May 9th 07 12:48 AM
Comparing Named ranges apologies for the dodgey post below Sam Crump Excel Worksheet Functions 5 March 7th 06 12:52 PM
Named ranges - column/row question Carole O Excel Discussion (Misc queries) 5 May 11th 05 02:40 PM


All times are GMT +1. The time now is 05:22 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"