How to merge 2 ranges from to worksheets?
Mike,
Here's how I'd do it:
1) Copy both sets of data to a new sheet, one set below the other.
2) Sort by UniqueID
3) Add this R1C1 formula to the last column
=R[-1]C1=RC1 (assuming UniqueID is in first column)
All unique rows will now have False in last column
4) Sort by last column
5) Find first "True" in last column and delete all rows from here down (use
Find or Application.Index
6) Create your array from this data
Cheers,
Dave
"mikeb" wrote:
What I want to do is take 2 ranges from 2 worksheets and create one range and
populate my udt array. The 2 ranges will have the same number of colums but
different amount of rows. I will use Find/FindNext to populate my udt based
on a list of unique id's that are in column A. I think I know how to do that
but not sure how to combine the 2 ranges. Can someone provide some code
examples? thanks a lot!
|