LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default concatenate with arrays

Hi,

Thank you for sharing this. Is there a source you can guide us to for
learning more on MS Query and the kind of problems it can solve.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"smartin" wrote in message
...
hande wrote:
Hello,

I want to porduce a list from two arrays.


A 1
B 2
C 3

I want the result to be
A1
A2
A3
B1
B2
B3
C1
C2
C3

I really have no clue.

Thanks


AFAIK, this is referred to as obtaining the Cartesian product. Here's the
way I know how to do it. This uses MSQUERY, which doesn't get a lot of
press but is very useful for manipulation of data (Excel and otherwise)
using SQL. You don't actually need to know SQL to do this though.

Set up a little worksheet like this cornered at A1:

First Second
A 1
B 2
C 3

Create two named ranges like
First : refers to =Sheet1!$A$1:$A$4
Second : refers to =Sheet1!$B$1:$B$4

Save the workbook.

Data | Import External Data | New Database Query

In the "Choose Data Source" dialog, select "Excel Files*" | OK

Navigate to the file you saved. If everything is correct so far, you will
see "First" and "Second" in "Available tables and columns". Use the
chevron to add each to the "Columns in your query". Next. The query
wizard complains that it can not join the tables, etc. OK. The query
editor will open and should display the kind of results you are looking
for. So, click File | Return Data to Microsoft Excel.

Now choose (click) a place to drop the query results, such as D1.

The results should look like

First Second
A 1
B 1
C 1
A 2
B 2
C 2
A 3
B 3
C 3

The results can be concatenated with the usual methods, e.g.,
=D2&E2

Hope you find this informative.

 
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
Two arrays same? FARAZ QURESHI Excel Discussion (Misc queries) 4 April 23rd 09 12:22 AM
Arrays Abdul Shakeel Excel Worksheet Functions 1 December 12th 08 10:24 AM
Regarding Arrays Raj Excel Discussion (Misc queries) 5 December 10th 08 03:51 PM
Arrays Dan Excel Worksheet Functions 3 September 15th 05 07:36 AM
I know how to concatenate ,can one de-concatenate to split date? QUICK BOOKS PROBLEM- New Users to Excel 1 July 26th 05 05:07 PM


All times are GMT +1. The time now is 12:02 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"