MATCH and INDEX formula?

krodriguez

Board Regular
Joined
Jul 11, 2012
Messages
119
Hi, trying to resolve a puzzle here, not sure if doing a combination of match/index will help

I have two worksheets. On worksheet 1 I have a summary for year-to-date numbers with two fields (net sales and gross profit, I do have more but for this example using only two), like this:
-Cell E1 is a drop down box with numerous years and cell B1 is linked to E1, so it can be dynamic.

ABCDE
1December 201512/1/2015
2Net Sales400
3Gross Profit400
4

<tbody>
</tbody>

Worksheet 2 have:

ABCDE
112/1/201212/1/201312/1/201412/1/2015
2Net Sales100200300400
3Gross Profit100200300400
4
5

<tbody>
</tbody>

Problem: How can I pull to sheet1 the results from sheet 2, net sales 400 and GP 400. Keep in mind that when the date on cell E1 (sheet1) changes to let's say to 12/1/2014 data needs to changes to NS 300 and GP 300. Formula needs to be dynamic to whatever date is selected.

Thanks!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I'm getting a #REF error... I should add that in worksheet 2 Net sales and gross profit are not in order and they don't have the same sequence as worksheet 1. Shouldn't the formula also be looking at column A to grab the right cells?
 
Upvote 0
Hi

Try

B2 Sheet1=INDEX(Sheet2!$B$2:$E$3,MATCH(Sheet1!A2,Sheet2!$A$2:$A$3,0),MATCH(Sheet1!$E$1,Sheet2!$B$1:$E$1,0)) Copy down
 
Upvote 0

Forum statistics

Threads
1,216,052
Messages
6,128,513
Members
449,456
Latest member
SammMcCandless

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