Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create named ranges in Column on worksheet | Excel Programming | |||
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... | Excel Programming | |||
Multiple Named Ranges in the Same Column | Excel Worksheet Functions | |||
Comparing Named ranges apologies for the dodgey post below | Excel Worksheet Functions | |||
Named ranges - column/row question | Excel Discussion (Misc queries) |