Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
AL
 
Posts: n/a
Default How can I do a one to many merge in Excel?

Hi, I am trying to merge two sets of data into one using a one to many merge,
for example:
In column A, I have In column B, I have
100 101
200 102
300 103

my results column will look like:
100101
100102
100103
200101
200102
200103
300101
300102
300103

Any help would be appreciated.

AL

  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default How can I do a one to many merge in Excel?

Try using MS Query:

With your lists in 2 named ranges, with column headings.
I used rngValList1 for the first list and rngValList2 for the second

List
100
200
300

List
101
102
103

Make sure the file is saved so Excel can find it, then:
1)DataImport External DataNew Database Query
Databases: Excel Files


Browse to the file, pick the data ranges to import.
(in my case the file is called Lists)
---Accept defaults until the next step.

At The last screen select the View data/Edit The Query option.

Click the [SQL] button

Since you'll only have 2 lists, each containing one field, combine those 2
fields with an ampersand (&) and set the new field name.

Example:
SELECT
rngValList1.List&rngValList2.List as Combo
FROM
`C:\ExcelQueries\Lists`.rngValList1 rngValList1,
`C:\ExcelQueries\Lists`.rngValList2 rngValList2

When you click "Return data to Excel" you should get the following:
Combo
100101
200101
300101
100102
200102
300102
100103
200103
300103

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"AL" wrote:

Hi, I am trying to merge two sets of data into one using a one to many merge,
for example:
In column A, I have In column B, I have
100 101
200 102
300 103

my results column will look like:
100101
100102
100103
200101
200102
200103
300101
300102
300103

Any help would be appreciated.

AL

  #3   Report Post  
Posted to microsoft.public.excel.misc
SVC
 
Posts: n/a
Default How can I do a one to many merge in Excel?

You want to "concatenate" the columns. If A1 is 100 and B1 is 101, in C1
type =A1&B1. Then copy the formula down as far as necessary. Finally, copy
the entire range of cells in column C, and Paste special, values--this will
eliminate the formula. You can then delete columns A and B.

"AL" wrote:

Hi, I am trying to merge two sets of data into one using a one to many merge,
for example:
In column A, I have In column B, I have
100 101
200 102
300 103

my results column will look like:
100101
100102
100103
200101
200102
200103
300101
300102
300103

Any help would be appreciated.

AL

  #4   Report Post  
Posted to microsoft.public.excel.misc
AL
 
Posts: n/a
Default How can I do a one to many merge in Excel?

Hi Ron,

I tried it, but it didn't work. I got an error message that says "This data
source contains no visible tables" right after I did the browse to the file
step.

AL


"AL" wrote:

Hi, I am trying to merge two sets of data into one using a one to many merge,
for example:
In column A, I have In column B, I have
100 101
200 102
300 103

my results column will look like:
100101
100102
100103
200101
200102
200103
300101
300102
300103

Any help would be appreciated.

AL

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
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
excel merge to create labels in word splash Excel Discussion (Misc queries) 1 August 23rd 05 09:12 PM
how do I use mail merge in excel for word documents Lisa J Duffy Excel Discussion (Misc queries) 1 August 4th 05 01:40 PM
Excel, when column A and B have same name make column C add up in mail merge Dani B via OfficeKB.com Excel Discussion (Misc queries) 6 July 22nd 05 07:43 PM
why can't I open my Excel data in Excel, but I can as a merge sour legalsec Excel Discussion (Misc queries) 3 January 8th 05 09:38 PM


All times are GMT +1. The time now is 08:51 AM.

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

About Us

"It's about Microsoft Excel"