How to find value with multiple tables with different column values?

Bpuad

New Member
Joined
Feb 17, 2012
Messages
36
Office Version
  1. 2019
Platform
  1. Windows
I have a problem. I have multiple tables and want to find a value. So far easy but my problem is that I have different values (dates in this case) in the columns. See attached picture.


So what I want to do it to find the value of a stock based on the name of the stock and the date. I have tried but just can't seem to find a solution :(.

This is the sheet I want the values in (it's all in the same file)

1607773126875.png


And this is the sheet where the values is

1607773325189.png
 

Attachments

  • 1607773054258.png
    1607773054258.png
    73.9 KB · Views: 6

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi Bpuad,

I assume all stock tables are the same format.
  1. Can you confirm all stock names will be above the Open price?
  2. Can you confirm how to calculate the Value, or do you just want opening price?
  3. Can you use XL2BB, or paste as text, the sample tables for three stocks so retyping the image can be avoided?
  4. I'll provide an Excel 2016 solution but can you update your profile with your version details?
 
Upvote 0
Hi Bpuad,

I assume all stock tables are the same format.
  1. Can you confirm all stock names will be above the Open price?
  2. Can you confirm how to calculate the Value, or do you just want opening price?
  3. Can you use XL2BB, or paste as text, the sample tables for three stocks so retyping the image can be avoided?
  4. I'll provide an Excel 2016 solution but can you update your profile with your version details?
Hi,

1. yes same format but different number of rows and dates.
2. I want closing price.
3. Don't know what that is or how to use it? Will have a look at YouTube.
4. Will do, I have MS office Professional plus 2019
 
Upvote 0
Hi,

so let's give it a try :). This is the sheet with all the data
Morris Excel Dashboard.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZ
11Boozt2Eolus Vind3FM Mattsson
2BooztDateOpenHighLowCloseVolumeEolus VindDateOpenHighLowCloseVolumeFM MattssonDateOpenHighLowCloseVolume
314632020-12-01175,4178,4166,4172,81 314 7552912020-12-03205,4206,4195,2198,7213 68814252020-12-08167,51701641643 201
414632020-12-02173174161,6165,2984 5252912020-12-04198202,2190,4196,2227 15214252020-12-09163169,5161,5161,51 635
514632020-12-03165,4166,2155155,2397 2742912020-12-07196,2200193,1195,785 73814252020-12-10161,5167161,5162,51 906
614632020-12-04155159,4152,8156297 3942912020-12-08196199,7194,1195,9110 42014252020-12-11164169,51641673 048
714632020-12-07161166,4157,4159,8651 8662912020-12-09197,5203,8196,5199,8111 990
814632020-12-08160,6161,6154,6157,4288 5042912020-12-10200,4202,4188,7193,5259 575
914632020-12-09157,4160,2155,8156,4241 3432912020-12-11193,9193,9189,5192,981 907
1014632020-12-10158,6158,8154,8157,4242 274
1114632020-12-11158159,6155,6156,2199 661
12
13
14
15
16
Data_stocks
Cell Formulas
RangeFormula
F1,V1,N1F1=IFERROR(D2,"")
D2D2=IFERROR(BD_STOCKPRICE(INDEX(INST!$B$3:$O$5000,MATCH(INDEX(Dashboard!$B$12:$C$26,MATCH(Data_stocks!D1,Dashboard!$B$12:$B$26,0),2),INST!$C$3:$C$5000,0),1),INDEX(Dashboard!$B$11:$L$26,MATCH(Data_stocks!D1,Dashboard!$B$11:$B$26,0),3),INDEX(Dashboard!$B$11:$L$26,MATCH(Data_stocks!D1,Dashboard!$B$11:$B$26,0),4),"d3:j4999"),"")
L2L2=IFERROR(BD_STOCKPRICE(INDEX(INST!$B$3:$O$5000,MATCH(INDEX(Dashboard!$B$12:$C$26,MATCH(Data_stocks!L1,Dashboard!$B$12:$B$26,0),2),INST!$C$3:$C$5000,0),1),INDEX(Dashboard!$B$11:$L$26,MATCH(Data_stocks!L1,Dashboard!$B$11:$B$26,0),3),INDEX(Dashboard!$B$11:$L$26,MATCH(Data_stocks!L1,Dashboard!$B$11:$B$26,0),4),"l3:r4999"),"")
T2T2=IFERROR(BD_STOCKPRICE(INDEX(INST!$B$3:$O$5000,MATCH(INDEX(Dashboard!$B$12:$C$26,MATCH(Data_stocks!T1,Dashboard!$B$12:$B$26,0),2),INST!$C$3:$C$5000,0),1),INDEX(Dashboard!$B$11:$L$26,MATCH(Data_stocks!T1,Dashboard!$B$11:$B$26,0),3),INDEX(Dashboard!$B$11:$L$26,MATCH(Data_stocks!T1,Dashboard!$B$11:$B$26,0),4),"t3:z4999"),"")
Named Ranges
NameRefers ToCells
Stock_1=Data_stocks!$D$1:$J$1999D2
Stock_2=Data_stocks!$L$1:$R$1999L2
Stock_3=Data_stocks!$T$1:$Z$1999T2



And this is the sheet where I want to sum all data
Cell Formulas
RangeFormula
B2:K2B2=IF(OFFSET(Data_stocks!$F$1,0,(COLUMN()-2)*$C$1)=0,"",OFFSET(Data_stocks!$F$1,0,(COLUMN()-2)*$C$1))
A3A3=MIN(Dashboard!$D$12:$D$104)
A4:A25A4=WORKDAY(A3,1)
 
Upvote 0
I had a problem with the formulae as a couple of tabs were missing so I just pasted the values provided.

The formula for B3 can be copied across and down. You may want to modify the ranges used to best fit your data size:
=IFERROR(INDEX(Data_stocks!$A$1:$ZZ$9999,MATCH($A3,OFFSET(Data_stocks!$A$1,,MATCH(B$2,Data_stocks!$2:$2,0),9999),0),(MATCH(B$2,Data_stocks!$2:$2,0)+1)+4),"")
 
Upvote 0
I had a problem with the formulae as a couple of tabs were missing so I just pasted the values provided.

The formula for B3 can be copied across and down. You may want to modify the ranges used to best fit your data size:
=IFERROR(INDEX(Data_stocks!$A$1:$ZZ$9999,MATCH($A3,OFFSET(Data_stocks!$A$1,,MATCH(B$2,Data_stocks!$2:$2,0),9999),0),(MATCH(B$2,Data_stocks!$2:$2,0)+1)+4),"")
Works like a charm :), thanks
 
Upvote 0

Forum statistics

Threads
1,216,118
Messages
6,128,939
Members
449,480
Latest member
yesitisasport

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