Results 1 to 20 of 20

Create array from named ranges

Threaded View

Lollpopp Create array from named ranges 01-01-2023, 09:19 AM
6StringJazzer Re: Create array from named... 01-01-2023, 09:23 AM
Sintek Re: Create array from named... 01-01-2023, 10:11 AM
Lollpopp Re: Create array from named... 01-01-2023, 10:55 AM
Sintek Re: Create array from named... 01-01-2023, 11:01 AM
torachan Re: Create array from named... 01-01-2023, 08:16 PM
mjr veverka Re: Create array from named... 01-02-2023, 09:42 AM
TMS Re: Create array from named... 01-02-2023, 01:09 PM
Lollpopp Re: Create array from named... 01-03-2023, 09:16 AM
Sintek Re: Create array from named... 01-03-2023, 09:36 AM
Lollpopp Re: Create array from named... 01-03-2023, 11:34 AM
Sintek Re: Create array from named... 01-03-2023, 11:58 AM
Sintek Re: Create array from named... 01-03-2023, 12:22 PM
Lollpopp Re: Create array from named... 01-03-2023, 12:52 PM
Sintek Re: Create array from named... 01-03-2023, 01:14 PM
beyond Excel Re: Create array from named... 01-03-2023, 03:27 PM
Sintek Re: Create array from named... 01-03-2023, 04:03 PM
Lollpopp Re: Create array from named... 01-04-2023, 10:20 AM
beyond Excel Re: Create array from named... 01-04-2023, 01:33 PM
Sintek Re: Create array from named... 01-04-2023, 12:07 PM
  1. #1
    Registered User
    Join Date
    08-12-2009
    Location
    Sweden
    MS-Off Ver
    Microsoft 365 MSO (Version 2301 Build 16.0.16015.20000) 64-bit
    Posts
    10

    Create array from named ranges

    I have named ranges with these values in different parts of the workbook:

    Named_range_1:
    1
    2
    3

    Named_range_2:
    4
    5
    6

    Named_range_3:
    7
    8
    9


    Im trying to get all of these named ranges into one array like this:

    array_1:
    1
    2
    3
    4
    5
    6
    7
    8
    9

    I tried to write the code but it will only accept one named range at a time:


    Sub test133()
     Dim array_1 As Variant
     
     array_1 = Range("Named_range_1").Value
    
     Dim i As Long
     
     For i = LBound(array_1, 1) To UBound(array_1, 1)
     Debug.Print array_1(i, 1)
     Next i
     
     
    End Sub

    How can I load more named ranges into the array?

    Thankful for any help!
    Last edited by Lollpopp; 01-01-2023 at 09:31 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA to Loop through array of named ranges
    By LKERN in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-13-2022, 12:29 PM
  2. Create Named Ranges from Array
    By toliphint in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-10-2020, 11:39 PM
  3. Replies: 2
    Last Post: 06-01-2011, 07:43 AM
  4. 2D Array of named ranges
    By hilander in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2008, 08:02 PM
  5. Array Formulas and Named Ranges
    By cpadude in forum Excel General
    Replies: 3
    Last Post: 10-04-2007, 11:33 AM
  6. [SOLVED] Can you create dynamic named ranges containing array formulas?
    By Marie J-son in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2006, 09:10 AM
  7. Looking up named ranges as an array
    By L.White in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2005, 05:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1