+ Reply to Thread
Results 1 to 4 of 4

writing a range to an array then writing the array to a new range

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2010
    Posts
    15

    writing a range to an array then writing the array to a new range

    I'm trying to write a range into an array so I can then write that array into a new range. I keep getting an "Application-defined or object-defined error" on the line "columnData = Worksheets("start").Range(Cells(rowFirst, column(1)), Cells(rowLast, column(1))).Value."

    Please Login or Register  to view this content.
    rowFirst, rowLast, column() are all integer variables.

    Thanks for any help.

  2. #2
    Registered User
    Join Date
    07-10-2013
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: writing a range to an array then writing the array to a new range

    I made a typo above. "columnData()" has a "()" in its declaration.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: writing a range to an array then writing the array to a new range

    It's Columns not Column.
    If posting code please use code tags, see here.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: writing a range to an array then writing the array to a new range

    If you want the range to be in column A, then use.
    (I haven't tested, but you might need to Dim ColumnData as Variant rather the as an array)

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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] New to arrays-Resizing cell range when writing array
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2013, 08:31 PM
  2. writing formula in range on each sheet via array
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2011, 12:59 PM
  3. Writing Multi-Dimensional Array To Range
    By Dan_Dollar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-04-2007, 04:11 PM
  4. Writing a range to an array...
    By Alex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2005, 10:10 AM
  5. Writing to An Array or Collection
    By vqthomf in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2005, 10:05 AM

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