+ Reply to Thread
Results 1 to 6 of 6

Using an array to add row names

  1. #1
    Forum Contributor mcinnes01's Avatar
    Join Date
    05-25-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    449

    Using an array to add row names

    Hi,

    I want to put my row headings in using an array, I tried with the following but it just puts "staff details" in every row.

    Please Login or Register  to view this content.
    Last edited by mcinnes01; 08-02-2011 at 07:27 AM.

  2. #2
    Registered User
    Join Date
    07-14-2011
    Location
    Lohr, Germany
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: Using an array to add row names

    Maybe there are more elegant solutions, but this should do the job:

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Using an array to add row names

    Hi mcinnes01
    I'm still learning array techniques too so can't be forthcoming with a more full explanation.
    I think it is to do with trying to copy a horizontal array into a vertical range.
    It thus needs to be transposed or as Richard suggests, use a loop.
    Use this as a second idea?

    Please Login or Register  to view this content.
    Last edited by barryleajo; 08-02-2011 at 06:12 AM.

  4. #4
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,255

    Re: Using an array to add row names

    I think it is to do with trying to copy a horizontal array into a vertical range.
    Yes, exactly so. In VBA, a one dimensional array is horizontal, not vertical.
    Hope that helps,

    Colin

    RAD Excel Blog

  5. #5
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Using an array to add row names

    @Colin
    many thanks, your previous 'tutorial' has rubbed-off a little, and this helps even more
    you are the man!

  6. #6
    Forum Contributor mcinnes01's Avatar
    Join Date
    05-25-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    449

    Re: Using an array to add row names

    Thanks got it to work

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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