Display concatenated source worksheet names in Query?

itm

New Member
Joined
Mar 20, 2010
Messages
9
I have a query which consolidates data from a few different worksheets. Broadly, the data consists of stock holdings - stock names/codes and current values. A specific stock may appear in one or more worksheets.
I'd like one of the columns in the query to show which worksheet(s) data was derived from. For example, if a particular stock is found in Sheet1 and Sheet4, then the required column would contain "Sheet1,Sheet4".
Is this possible?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Simple answer is Yes. How to do it will depend on seeing some sample data to develop schema
 
Upvote 0
OK that sounds promising. Here's some sample data..
The first 3 worksheets contain the base data. The sheets don't all have the same layouts, but the "Description" and "Valuation" columns are common, and are used as the basis of the aggregation. One of the stocks appears in more than one sheet (BLACKROCK ENERGY & RES INC TST PLC ORD GBP0.01). The 4th sheet contains the summary/aggregate data from the other 3 sheets. I'd like the "In Worksheets" column to show which worksheets the data was derived from. So for example cell H3 in the Summary worksheet would contain "II SIPP,II ISA".
This is the first time I've tried to upload sample data, so I hope I've interpreted the instructions correctly!

inv.xlsm
ABCDEFG
1SymbolQtyDescriptionPriceChangeChg % Valuation
2BBGI3079BBGI GLOBAL INFRASTRUCTURE S.A. ORD NPV (DI)162.40p1.20p0.74%£5,000.30
3BERI1234BLACKROCK ENERGY & RES INC TST PLC ORD GBP0.01106.50p-2.87p-2.63%£1,314.21
4DAC165DANAOS CORP COM USD0.01(POST REV SPLT)£51.93-£0.73-1.39%£8,567.62
II SIPP


inv.xlsm
ABCDEF
1DescriptionQtyAvg CostBook CostLatest Price Valuation
23I INFRASTRUCTURE ORD NPV1717275.0542p£4,722.68331.50p£5,691.86
3AEW UK REIT PLC ORD GBP0.011250079.4665p£9,933.31116.20p£14,525.00
4BBGI GBL INFRSTR S ORD NPV DI7046170.2908p£11,998.69162.60p£11,456.80
5BLACKROCK ENGY R ORD GBP0.01700189.25p£6,248.39111.00p£7,771.11
iWeb ISA



inv.xlsm
ABCDEFG
1SymbolQtyDescriptionPriceChangeChg % Valuation
2APAX2482APAX GLOBAL ALPHA LTD ORD NPV178.80p0.60p0.34%£ 4,437.82
3COIN11COINBASE GLOBAL INC COM USD0.00001 CL A£40.94-£1.18-£0.03£450.33
4DGI919223DIGITAL 9 INFRASTRUCTURE PLC ORD NPV110.20p-0.60p-£0.01£ 21,183.75
5LWDB604LAW DEBENTURE CORP ORD GBP0.05760.00p-14.00p-£0.02£ 4,590.40
6BERI600BLACKROCK ENERGY & RES INC TST PLC ORD GBP0.01106.50p-2.87p-2.63%£655.99
II ISA


inv.xlsm
ABCDEFGH
1SymbolQtyDescriptionPriceChangeChg % Valuation In Worksheets
2BBGI3079BBGI GLOBAL INFRASTRUCTURE S.A. ORD NPV (DI)162.40p1.20p0.74%£5,000.30
3BERI1234BLACKROCK ENERGY & RES INC TST PLC ORD GBP0.01106.50p-2.87p-2.63%£1,314.21
4DAC165DANAOS CORP COM USD0.01(POST REV SPLT)£51.93-£0.73-1.39%£8,567.62
517173I INFRASTRUCTURE ORD NPV275.0542p£4,722.68
612500AEW UK REIT PLC ORD GBP0.0179.4665p£9,933.31
77046BBGI GBL INFRSTR S ORD NPV DI170.2908p£11,998.69
87001BLACKROCK ENGY R ORD GBP0.0189.25p£1,970.20
9APAX2482APAX GLOBAL ALPHA LTD ORD NPV178.80p0.60p0.34%£ 4,437.82
10COIN11COINBASE GLOBAL INC COM USD0.00001 CL A£40.94-£1.18-£0.03£450.33
11DGI919223DIGITAL 9 INFRASTRUCTURE PLC ORD NPV110.20p-0.60p-£0.01£21,183.75
12LWDB604LAW DEBENTURE CORP ORD GBP0.05760.00p-14.00p-£0.02£ 4,590.40
Summary
Cell Formulas
RangeFormula
G8G8='II SIPP'!G3+'II ISA'!G6
 
Upvote 0

Forum statistics

Threads
1,215,006
Messages
6,122,666
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top