ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Consolidating Unequal Lists (https://www.excelbanter.com/excel-programming/441884-consolidating-unequal-lists.html)

royhamill

Consolidating Unequal Lists
 
Hello,
I have 2 lists of data in different worksheets of the same workbook
similar to below:

Product City
Apples London
Oranges Birmingham
Pears Manchester


I want to create 1 list (2 columns) in 1 worksheet that looks like:


Product City
Apples London
Apples Birmingham
Apples Manchester
Oranges London
Oranges Birmingham
Oranges Manchester
Pears London
Pears Birmingham
Pears Manchester


I can do this if I use MSQuery, but the spreadsheet is going to be
deployed to multiple locations and saved in different server locations
so the query falls over at this point.
Can anyone please help with the VBA to accomplish this?


Many thanks


Roy




Jacob Skaria

Consolidating Unequal Lists
 
Check out the topic "Copy from row 2 till the last row with data" at the
below link by Ron de Bruin

http://www.rondebruin.nl/copy2.htm

--
Jacob (MVP - Excel)


"royhamill" wrote:

Hello,
I have 2 lists of data in different worksheets of the same workbook
similar to below:

Product City
Apples London
Oranges Birmingham
Pears Manchester


I want to create 1 list (2 columns) in 1 worksheet that looks like:


Product City
Apples London
Apples Birmingham
Apples Manchester
Oranges London
Oranges Birmingham
Oranges Manchester
Pears London
Pears Birmingham
Pears Manchester


I can do this if I use MSQuery, but the spreadsheet is going to be
deployed to multiple locations and saved in different server locations
so the query falls over at this point.
Can anyone please help with the VBA to accomplish this?


Many thanks


Roy




royhamill

Consolidating Unequal Lists
 
Hi Jacob,
Thanks for this and I can see some code in there which will be useful to me
for other things, but when I run the example you suggested, I get the
following list

Apples
Oranges
Pears
London
Birmingham
Manchester

As you can see, it does not give me the list I require. Any suggestions?

Thanks in advance

Roy

"Jacob Skaria" wrote:

Check out the topic "Copy from row 2 till the last row with data" at the
below link by Ron de Bruin

http://www.rondebruin.nl/copy2.htm

--
Jacob (MVP - Excel)


"royhamill" wrote:

Hello,
I have 2 lists of data in different worksheets of the same workbook
similar to below:

Product City
Apples London
Oranges Birmingham
Pears Manchester


I want to create 1 list (2 columns) in 1 worksheet that looks like:


Product City
Apples London
Apples Birmingham
Apples Manchester
Oranges London
Oranges Birmingham
Oranges Manchester
Pears London
Pears Birmingham
Pears Manchester


I can do this if I use MSQuery, but the spreadsheet is going to be
deployed to multiple locations and saved in different server locations
so the query falls over at this point.
Can anyone please help with the VBA to accomplish this?


Many thanks


Roy




Iqbal[_2_]

Consolidating Unequal Lists
 
Try using pivot table with consildated regions -- using pivot table wizard

"royhamill" wrote in message
...
Hi Jacob,
Thanks for this and I can see some code in there which will be useful to
me
for other things, but when I run the example you suggested, I get the
following list

Apples
Oranges
Pears
London
Birmingham
Manchester

As you can see, it does not give me the list I require. Any suggestions?

Thanks in advance

Roy

"Jacob Skaria" wrote:

Check out the topic "Copy from row 2 till the last row with data" at the
below link by Ron de Bruin

http://www.rondebruin.nl/copy2.htm

--
Jacob (MVP - Excel)


"royhamill" wrote:

Hello,
I have 2 lists of data in different worksheets of the same workbook
similar to below:

Product City
Apples London
Oranges Birmingham
Pears Manchester


I want to create 1 list (2 columns) in 1 worksheet that looks like:


Product City
Apples London
Apples Birmingham
Apples Manchester
Oranges London
Oranges Birmingham
Oranges Manchester
Pears London
Pears Birmingham
Pears Manchester


I can do this if I use MSQuery, but the spreadsheet is going to be
deployed to multiple locations and saved in different server locations
so the query falls over at this point.
Can anyone please help with the VBA to accomplish this?


Many thanks


Roy







All times are GMT +1. The time now is 03:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com