+ Reply to Thread
Results 1 to 2 of 2

Store Column A & B values in separate arrays for every unique value in Column A

  1. #1
    Registered User
    Join Date
    03-15-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    25

    Store Column A & B values in separate arrays for every unique value in Column A

    Column A has a bunch of repeating values and I want to store the unique values in an array. At the same time i want to store column B for those unique values in another array so I can later transpose them to rows 1 and 2 and keep the pairs together. (But I don't want to transpose just yet so don't worry about that part.) Imagine If column A was a username and column B was the passsword. As I find unique usernames in column A I also want to store the password from column B in another array. Later tehy will be transposed. I am currently transposing the data at the end of the function but that is only to verify the data is stored correctly. Once I confirm the output I'll remove that and transpose to rows later in the macro. I took a piece of code that finds unique values in Column A. I tried to modify it to store column b in a separate array at the same time but currently it only works for the first pair. I think its an incrementing issue but not sure what to change.
    Thanks in advance for your help!

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    03-15-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Store Column A & B values in separate arrays for every unique value in Column A

    Figured it out... Here is the code...(may not be the best way but it works for me!

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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