Find Specific Value by Referencing multiple cells...

Robz999

New Member
Joined
Oct 14, 2011
Messages
14
Hello,

I have annual financial statements issued for each area, every year. Each financial statement is saved as a separate excel file. I would like to compare the results area by area, and year by year. To do this, I need my main spread sheet to reference specific cells in other spreadsheets.</SPAN>
But there are two challenges I can’t figure out how to overcome.</SPAN>

  1. The cells I’m interested in are not always on the same row. (Ex. if one area doesn’t sell a specific product, that product is omitted. So one area may sell 3 products and would have Product A, Product B, Product and Product C in Rows 1, 2, and 3. Another area may sell 4 different products and would have Product B, Product D, Product Q, and Product R in Rows 1, 2, 3 and 4). Generally, I could manage this with VLOOKUP/INDEX, but part 2 confounds this. </SPAN>
  2. The Product names repeat themselves under different headers. </SPAN>
Example: (Header in Column A; Product in Column D)</SPAN>
Volumes- </SPAN>
Product A </SPAN>
Volumes per day- </SPAN>
Product A </SPAN>
Prices- </SPAN>
Product A</SPAN>
Revenue-</SPAN>
Product A</SPAN>
So what I need it to do is look up the correct header, then look ONLY in the values below that header for the value I want.</SPAN>

*Note*: The Headers are always the same; Only the products (and consequently the row #) change. I have included an example below.</SPAN>

Output:
Volume per day</SPAN>
A</SPAN>
B</SPAN>
C</SPAN>
D</SPAN>
G</SPAN>
H</SPAN>
Q</SPAN>
S</SPAN>
T</SPAN>
Property 1</SPAN>
2</SPAN>
22</SPAN>
15</SPAN>
9</SPAN>
NA</SPAN>
NA</SPAN>
NA</SPAN>
NA</SPAN>
NA</SPAN>
Property 2</SPAN>
4</SPAN>
22</SPAN>
NA</SPAN>
NA</SPAN>
NA</SPAN>
NA</SPAN>
14</SPAN>
9</SPAN>
4</SPAN>

<TBODY>
</TBODY>
</SPAN>


Data: (Note- each "Property" is a different spreadsheet)
PROPERTY 1</SPAN>
Year:</SPAN>
2011</SPAN>
Volumes</SPAN>
Product</SPAN>
Account Major</SPAN>
Account Minor</SPAN>
Account Name</SPAN>
Total</SPAN>
6000</SPAN>
10</SPAN>
A</SPAN>
730</SPAN>
6000</SPAN>
20</SPAN>
B</SPAN>
8030</SPAN>
6000</SPAN>
22</SPAN>
C</SPAN>
5475</SPAN>
6000</SPAN>
30</SPAN>
D</SPAN>
3285</SPAN>
Volumes Per Day</SPAN>
Product</SPAN>
Account Major</SPAN>
Account Minor</SPAN>
Account Name</SPAN>
Average</SPAN>
6000</SPAN>
10</SPAN>
A</SPAN>
2</SPAN>
6000</SPAN>
20</SPAN>
B</SPAN>
22</SPAN>
6000</SPAN>
22</SPAN>
C</SPAN>
15</SPAN>
6000</SPAN>
30</SPAN>
D</SPAN>
9</SPAN>
Prices</SPAN>
Product</SPAN>
Account Major</SPAN>
Account Minor</SPAN>
Account Name</SPAN>
Average</SPAN>
6000</SPAN>
10</SPAN>
A</SPAN>
$ 0.50 </SPAN>
6000</SPAN>
20</SPAN>
B</SPAN>
$ 1.10 </SPAN>
6000</SPAN>
22</SPAN>
C</SPAN>
$ 1.90 </SPAN>
6000</SPAN>
30</SPAN>
D</SPAN>
$ 0.70 </SPAN>
Revenue</SPAN>
Account Type</SPAN>
Account Major</SPAN>
Account Minor</SPAN>
Account Name</SPAN>
Total</SPAN>
6000</SPAN>
10</SPAN>
A</SPAN>
$ 365.00 </SPAN>
6000</SPAN>
20</SPAN>
B</SPAN>
$ 8,833.00 </SPAN>
6000</SPAN>
22</SPAN>
C</SPAN>
$ 10,402.50 </SPAN>
6000</SPAN>
30</SPAN>
D</SPAN>
$ 2,299.50 </SPAN>

<TBODY>
</TBODY>


PROPERTY 2</SPAN>
Year:</SPAN>
2011</SPAN>
Volumes</SPAN>
Product</SPAN>
Account Major</SPAN>
Account Minor</SPAN>
Account Name</SPAN>
Total</SPAN>
6000</SPAN>
10</SPAN>
A</SPAN>
1460</SPAN>
6000</SPAN>
22</SPAN>
C</SPAN>
8030</SPAN>
6000</SPAN>
90</SPAN>
Q</SPAN>
5110</SPAN>
6300</SPAN>
10</SPAN>
S</SPAN>
3285</SPAN>
6300</SPAN>
17</SPAN>
T</SPAN>
1460</SPAN>
Volumes Per Day</SPAN>
Product</SPAN>
Account Major</SPAN>
Account Minor</SPAN>
Account Name</SPAN>
Average</SPAN>
6000</SPAN>
10</SPAN>
A</SPAN>
4</SPAN>
6000</SPAN>
20</SPAN>
B</SPAN>
22</SPAN>
6000</SPAN>
90</SPAN>
Q</SPAN>
14</SPAN>
6300</SPAN>
10</SPAN>
S</SPAN>
9</SPAN>
6300</SPAN>
17</SPAN>
T</SPAN>
4</SPAN>
Prices</SPAN>
Product</SPAN>
Account Major</SPAN>
Account Minor</SPAN>
Account Name</SPAN>
Average</SPAN>
6000</SPAN>
10</SPAN>
A</SPAN>
$ 0.50 </SPAN>
6000</SPAN>
20</SPAN>
B</SPAN>
$ 1.10 </SPAN>
6000</SPAN>
90</SPAN>
Q</SPAN>
$ 0.10 </SPAN>
6300</SPAN>
10</SPAN>
S</SPAN>
$ 9.00 </SPAN>
6300</SPAN>
17</SPAN>
T</SPAN>
$ 14.00 </SPAN>
Revenue</SPAN>
Account Type</SPAN>
Account Major</SPAN>
Account Minor</SPAN>
Account Name</SPAN>
Total</SPAN>
6000</SPAN>
10</SPAN>
A</SPAN>
$ 730.00 </SPAN>
6000</SPAN>
20</SPAN>
B</SPAN>
$ 8,833.00 </SPAN>
6000</SPAN>
90</SPAN>
Q</SPAN>
$ 511.00 </SPAN>
6300</SPAN>
10</SPAN>
S</SPAN>
$ 29,565.00 </SPAN>
6300</SPAN>
17</SPAN>
T</SPAN>
$ 20,440.00 </SPAN>

<TBODY>
</TBODY>
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You can use offset function to find the range where you need to run the vlookup. I took another sheet of my own, because I wanted to be sure this will work across different workbooks, so you won't recognise any of your data but you will be able to adapt the formula.

Data File first

Excel Workbook
FGHIJ
2457
3Head148911
4P1591012
5P27111214
6Head29131416
7P111151618
8P213171820
9Head316202123
10P117212224
11P219232426
12P323272830
13Head4
Sheet1




Output file


Excel Workbook
ABCD
1****
2All Headings***
3Head13**
4Head26**
5Head39**
6Head413**
7****
8Combined data***
9Head1***
10P1*59
11P2*711
12P3***
13P4***
Sheet10
 
Upvote 0

Forum statistics

Threads
1,215,235
Messages
6,123,786
Members
449,125
Latest member
shreyash11

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