Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default How to merge 2 ranges from to worksheets?

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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default How to merge 2 ranges from to worksheets?

Hi,

Just want to say Hi, and I was wondering how everything is going.
Did Dave's suggestion help you?
If anything is unclear, please let me know.
It is my pleasure to be of assistance.


Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
merge named ranges ? rolando Charts and Charting in Excel 2 March 1st 09 10:04 AM
merge named ranges Roland Excel Worksheet Functions 1 November 10th 08 01:30 PM
How to merge worksheets on a key - merge horizontally, that is [email protected] Excel Programming 4 November 4th 06 12:59 AM
merge ranges Jim Thomlinson[_5_] Excel Programming 0 February 4th 06 11:04 PM
how to merge ranges from multiple worksheets crowleydl Excel Worksheet Functions 0 August 5th 05 07:24 PM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"