none
Array Handling RRS feed

  • Question

  • Hi, I have a large array Data_Base(1 To 40000, 1 To 50), that is partly filled with data. I need to copy that data base to another file but would like to copy/paste only the part that contains data. I tried to use ReDim declaration with the actual number of relevant rows - but it didn't have any effect as it always copied 40,000 lines.

    Any suggestions?

    Ran.

    Wednesday, April 16, 2014 2:22 PM

All replies

  • Loop through the array and check for Null Strings/Null values in them, if they have non null values copy into new array or export it. Else simply skip the array entry.

    Happy to help ! When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answered

    Wednesday, April 16, 2014 2:33 PM
  • Thanks for the quick response. However, looping through 40,000 cells checking for nulls will take forever... I know how many valid rows I have, using the COUNT function and would like to copy only that number of rows.
    Wednesday, April 16, 2014 2:43 PM
  • Since you are dealing with Multidimension array, you cannot ReDim the whole array only the last dimension can be ReDimed !

    Happy to help ! When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answered

    Wednesday, April 16, 2014 3:03 PM