Consulting

Results 1 to 2 of 2

Thread: populating dynamic arrays from a dynamic array

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    populating dynamic arrays from a dynamic array

    I have 2 worksheets with very large amounts of data in each. I need to do several different compares against both of them. The first I need to do is create a new workbook of all the records on sheet1 not on sheet2, then those on sheet2 not on sheet1. I have read sheet1 into a dynamic array and sheet2 into another seperate dynaic array. I then am reading thru sheet1 array and looking for the instance of a value (ssn) on sheet2. If not found, I would like to put 3 fields from sheet1 array into a new array call NotFoundArray. I am getting a type mismatch when I try to add the second value to the NotFoundArray.

    ReDim NotFoundArray(NotFoundRecCnt, 3)
    ....
    NotFoundCnt = NotFoundCnt + 1
    NotFoundArray(NotFoundCnt, 1) = TempSSN
    NotFoundArray(NotFoundCnt, 2) = TempName 'name
    NotFoundArray(NotFoundCnt, 3) = "Not found in sheet2" 'message
    I add 1 to NotFoundCnt everytime I have another instance of SSN not found. I get the type mismtach on the 'name line of code.
    Last edited by Aussiebear; 12-13-2024 at 03:20 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •