+ Reply to Thread
Results 1 to 4 of 4

Equating an array with named range: is this possible?

Hybrid View

Erik_G Equating an array with named... 04-22-2015, 04:04 PM
mehmetcik Re: Equating an array with... 04-22-2015, 04:15 PM
Erik_G Re: Equating an array with... 04-22-2015, 04:28 PM
MrShorty Re: Equating an array with... 04-22-2015, 04:15 PM
  1. #1
    Registered User
    Join Date
    06-20-2014
    Location
    Austin, TX, USA
    MS-Off Ver
    Office 2013 and 2016
    Posts
    9

    Equating an array with named range: is this possible?

    Hi!

    I have a range on a worksheet called "ethyl" that is A1:AM2521 which is a data set. I'd like to send this range to a VBA variable say "earray" of the same size and then use the array to reorganize/restructure the data into a more convenient form for analysis. Can I do something like:

    Option Base 1

    Sub ethylene()
    Dim earray(1 To 2521, 1 To 39) As Variant
    Dim x As Integer, y As Integer, i As Integer, j As Integer

    'range ethyl is already named
    earray = range("ethyl")

    '....

    End Sub

    Thanks in advance for your help!

    Erik_G

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Equating an array with named range: is this possible?

    It is easier than that:

    MyArray = Range("A1:AM2521").value
    And the reverse works too

    Range("A1:AM2521").value = MyArray
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    06-20-2014
    Location
    Austin, TX, USA
    MS-Off Ver
    Office 2013 and 2016
    Posts
    9

    Re: Equating an array with named range: is this possible?

    Problem solved!! Thank you!

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,362

    Re: Equating an array with named range: is this possible?

    Something like what this guy is talking about: http://www.cpearson.com/excel/ArraysAndRanges.aspx
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Evaluate Named Range Array formula to VBA Array
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-07-2014, 09:06 PM
  2. Array formulas referencing a named range or named table
    By anrichards22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-03-2013, 11:59 PM
  3. Named Range to Array
    By efernandes67 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-21-2011, 03:38 PM
  4. Copy named range ARRAY
    By dvb_24 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-31-2011, 10:55 AM
  5. Read a named range into an array
    By brucemc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-12-2007, 06:20 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