Consulting

Results 1 to 4 of 4

Thread: comparing elements of 2 arrays

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    May 2018
    Posts
    2
    Location

    comparing elements of 2 arrays

    Hallo guys,

    I am pretty new in vba and want to try something. I have 2 dynamic multidimensional arrays and want to compare elements with both arrays. For example in the first element of Array 1 are names and also in the first element of Array2. If the names in element of Array 1 and Array 2 are the same, multiply element 2 of Array 1 by element 2 of Array 2.

    Example:

    Array 1
    Paul John etc.
    34 36 etc.

    Array 2
    Paul Harry etc.
    7 5 etc.

    So in this case it should multiply 34 by 7 and write the answer a third array
    If the names don't equal, skip to next element and compare. I am sorry my english is not the best. Hope you understand what I mean. I would be very greatful if you could help me.
    Last edited by anna2d3; 05-24-2018 at 12:40 AM.

Posting Permissions

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