+ Reply to Thread
Results 1 to 3 of 3

Read range into an array, work with it, then paste it back to a sheet.

  1. #1
    Registered User
    Join Date
    02-08-2012
    Location
    Latvia
    MS-Off Ver
    Excel 2010
    Posts
    8

    Red face Read range into an array, work with it, then paste it back to a sheet.

    Hello masters of Excel!

    Lets say I have a simple table with data like this in ABC columns:
    Alan 500 Car
    Susan 200 Bike
    John 1 Foot
    Cat 80 Ship
    Dog 43 Boat

    Is there a simple way top read it into a 2d VBA array (Boat being at adress [5,30], 200 being at adress [2,2]?
    //I do some stuff with the array here//
    Then after that being done I want to "paste" the array back to the worksheet the way it looked before (the number of rows in x dimension, number of columns in y dimension).
    Can this be done without looping, but simply pasting the whole range or even better collumns 1 by 1?
    Looping through each value does not do much good here, as i have a very large data table, that takes too long to loop through.

    Best Regards,
    Valters
    Last edited by wolis; 12-18-2012 at 10:06 AM. Reason: Solved

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Read range into an array, work with it, then paste it back to a sheet.

    Please Login or Register  to view this content.
    for instance
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    02-08-2012
    Location
    Latvia
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Read range into an array, work with it, then paste it back to a sheet.

    Thanks Joseph!
    This does exactly what I want!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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