Index Match QTD?

amc1528

New Member
Joined
Aug 28, 2015
Messages
18
Hello. I am trying to see if it's possible to create a formula that can do a QTD (quarter to date) or YTD (dynamic range) formula with index, match, match. I have index match match which gives me a single month's data, and I have a QTD index match formula, which can give me the qtd data through a specific month, but not a specific account. Is it possible to have both? I'm hoping that it's a simple thing for someone out there. Thanks!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
It probably could but .....
we're not mindreaders, so make it as easy as you can for us to help you.

  • State your question clearly, including your entire need at the start.
  • Add some representative sample data - actual data is much better than an image (see also "Posting Aids" below).
  • Tell us what formula you have currently, and why your results are not what you want.
  • Include which version of Excel and Operating System you are using.
  • Before posting, read your question back to yourself to check it will make sense to somebody unfamiliar with your worksheet.
 
Upvote 0
I'm having an issue being able to upload files to include sample data which is why there is none, anyone no why that might be? I have no option to upload an excel, word, or anything excel a URL.

I will try my best to describe the situation. I have a sample set of data;
cell A1 is blank, the rest of row 1 is the months Jan, feb, mar, etc...
column a is the account names
row 2 net sales
row 3 cogs
row 4 imu
row 4 igm

I have a formula that can do QTD (quarter to date) which is SUM($B2:INDEX($B2:$M2,MATCH($C$13,$B$1:$M$1,0)))-IF(MATCH($C$13,$B$1:$M$1,0)<4,0,SUM($B2:INDEX($B2:$M2,INT(MATCH($C$13,$B$1:$M$1,0)/3)*3-(MOD(MATCH($C$13,$B$1:$M$1,0),3)=0)*3)))

OR I have a formula that can do index match match INDEX(B$2:$M$5,MATCH($B16,$A$2:$A$5,0),MATCH($C$13,$B$1:$M$1,0))

I would like to have the index match match functionality so that it looks up both the month and the account, but also calculates the QTD (or YTD really) amount.
 
Upvote 0
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 1294"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[TD]May[/TD]
[TD]Jun[/TD]
[TD]Jul[/TD]
[TD]Aug[/TD]
[TD]Sep[/TD]
[TD]Oct[/TD]
[TD]Nov[/TD]
[TD]Dec[/TD]
[TD]FY[/TD]
[/TR]
[TR]
[TD]Net Sales[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]2,500[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]2,500[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]2,500[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]2,500[/TD]
[TD="align: right"]18,000[/TD]
[/TR]
[TR]
[TD]COGS[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]3,200[/TD]
[/TR]
[TR]
[TD]Gross IMU[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2,200[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2,200[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2,200[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2,200[/TD]
[TD="align: right"]14,800[/TD]
[/TR]
[TR]
[TD]IGM[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2,245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2,245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2,245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2,245[/TD]
[TD="align: right"]15,340[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 456"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD]QTD[/TD]
[TD]Single Month[/TD]
[TD]If April[/TD]
[TD]If May[/TD]
[/TR]
[TR]
[TD]in millions[/TD]
[TD]w/o account lookup[/TD]
[TD]Index Match[/TD]
[TD]Should be[/TD]
[TD]Should be[/TD]
[/TR]
[TR]
[TD]Net Sales[/TD]
[TD] $1,000[/TD]
[TD] $1,000[/TD]
[TD] $1,000[/TD]
[TD] $2,000[/TD]
[/TR]
[TR]
[TD]COGS[/TD]
[TD] $250[/TD]
[TD] $250[/TD]
[TD] $250[/TD]
[TD] $500[/TD]
[/TR]
[TR]
[TD]COGS[/TD]
[TD] $750[/TD]
[TD] $250[/TD]
[TD] $250[/TD]
[TD] $500[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hi,

This is with index - match formula.

[TABLE="width: 1098"]
<colgroup><col><col><col><col><col><col span="9"></colgroup><tbody>[TR]
[TD][/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[TD]May[/TD]
[TD]Jun[/TD]
[TD]Jul[/TD]
[TD]Aug[/TD]
[TD]Sep[/TD]
[TD]Oct[/TD]
[TD]Nov[/TD]
[TD]Dec[/TD]
[TD]FY[/TD]
[/TR]
[TR]
[TD]Net Sales[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[TD="align: right"]18000[/TD]
[/TR]
[TR]
[TD]COGS[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]3200[/TD]
[/TR]
[TR]
[TD]Gross IMU[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2200[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2200[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2200[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2200[/TD]
[TD="align: right"]14800[/TD]
[/TR]
[TR]
[TD]IGM[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2245[/TD]
[TD="align: right"]15340[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]QTD[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[TD]May[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]in millions[/TD]
[TD]w/o account lookup[/TD]
[TD]Index Match[/TD]
[TD]Should be[/TD]
[TD]Should be[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Net Sales[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]COGS[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]IGM[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


This is formula used..
Code:
[TABLE="width: 1634"]
<colgroup><col><col><col span="2"><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]QTD[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[TD]May[/TD]
[/TR]
[TR]
[TD]in millions[/TD]
[TD]w/o account lookup[/TD]
[TD]Index Match[/TD]
[TD]Should be[/TD]
[TD]Should be[/TD]
[/TR]
[TR]
[TD]Net Sales[/TD]
[TD]1000[/TD]
[TD]=INDEX($B$3:$M$6,MATCH($A11,$A$3:$A$6,0),MATCH(C$9,$B$2:$M$2,0))[/TD]
[TD]=INDEX($B$3:$M$6,MATCH($A11,$A$3:$A$6,0),MATCH(D$9,$B$2:$M$2,0))[/TD]
[TD]=INDEX($B$3:$M$6,MATCH($A11,$A$3:$A$6,0),MATCH(E$9,$B$2:$M$2,0))[/TD]
[/TR]
[TR]
[TD]COGS[/TD]
[TD]250[/TD]
[TD]=INDEX($B$3:$M$6,MATCH($A12,$A$3:$A$6,0),MATCH(C$9,$B$2:$M$2,0))[/TD]
[TD]=INDEX($B$3:$M$6,MATCH($A12,$A$3:$A$6,0),MATCH(D$9,$B$2:$M$2,0))[/TD]
[TD]=INDEX($B$3:$M$6,MATCH($A12,$A$3:$A$6,0),MATCH(E$9,$B$2:$M$2,0))[/TD]
[/TR]
[TR]
[TD]IGM[/TD]
[TD]750[/TD]
[TD]=INDEX($B$3:$M$6,MATCH($A13,$A$3:$A$6,0),MATCH(C$9,$B$2:$M$2,0))[/TD]
[TD]=INDEX($B$3:$M$6,MATCH($A13,$A$3:$A$6,0),MATCH(D$9,$B$2:$M$2,0))[/TD]
[TD]=INDEX($B$3:$M$6,MATCH($A13,$A$3:$A$6,0),MATCH(E$9,$B$2:$M$2,0))[/TD]
[/TR]
</tbody>[/TABLE]


1st March formula..
=INDEX($B$3:$M$6,MATCH($A11,$A$3:$A$6,0),MATCH(C$9,$B$2:$M$2,0))

B3 to M6 is,
[TABLE="width: 876"]
<colgroup><col><col><col><col><col span="8"></colgroup><tbody>[TR]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[/TR]
[TR]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2200[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2200[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2200[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2200[/TD]
[/TR]
[TR]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]2245[/TD]
[/TR]
</tbody>[/TABLE]

A11 is,
[TABLE="width: 72"]
<colgroup><col></colgroup><tbody>[TR]
[TD]Net Sales[/TD]
[/TR]
[TR]
[TD]COGS[/TD]
[/TR]
[TR]
[TD]IGM[/TD]
[/TR]
</tbody>[/TABLE]

A3 to A6 is,
[TABLE="width: 72"]
<colgroup><col></colgroup><tbody>[TR]
[TD]Net Sales[/TD]
[/TR]
[TR]
[TD]COGS[/TD]
[/TR]
[TR]
[TD]Gross IMU[/TD]
[/TR]
[TR]
[TD]IGM[/TD]
[/TR]
</tbody>[/TABLE]


c9 is,
[TABLE="width: 436"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]QTD[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[TD]May[/TD]
[/TR]
[TR]
[TD]in millions[/TD]
[TD]w/o account lookup[/TD]
[TD]Index Match[/TD]
[TD]Should be[/TD]
[TD]Should be[/TD]
[/TR]
[TR]
[TD]Net Sales[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]2500[/TD]
[TD="align: right"]1000[/TD]
[TD="align: right"]1000[/TD]
[/TR]
[TR]
[TD]COGS[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]IGM[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]2245[/TD]
[TD="align: right"]795[/TD]
[TD="align: right"]795[/TD]
[/TR]
</tbody>[/TABLE]

b2 to m2 is,
[TABLE="width: 876"]
<tbody>[TR]
[TD="width: 131"]Jan[/TD]
[TD="width: 83"]Feb[/TD]
[TD="width: 69"]Mar[/TD]
[TD="width: 81"]Apr[/TD]
[TD="width: 64"]May[/TD]
[TD="width: 64"]Jun[/TD]
[TD="width: 64"]Jul[/TD]
[TD="width: 64"]Aug[/TD]
[TD="width: 64"]Sep[/TD]
[TD="width: 64"]Oct[/TD]
[TD="width: 64"]Nov[/TD]
[TD="width: 64"]Dec[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Thanks vbabginer. I know how to do the index match. What I am looking for is for the QTD formula to be able to look at both the month and the account. Is that possible? I can do an index match, which will return the specific account for a specific month, or I can do a QTD formula which will do the qtd amount through a specific month but irrespective of the account that I have put in, it will merely go on the row that it is tied to, it isn't intelligent enough to look for the account, that is the piece that i am looking for.
 
Upvote 0
No my apologies...Sumproduct will work. but i never worked on that..
 
Upvote 0
that will not work easily with the QTD portion without other variables. I can do it with adding in another row of numbers to correlate with the month number, then putting in an if then statement for less than or greater than for the month. The QTD formula that I am using does not need that. That is what I was asking about to see if that was somehow adaptable to also look up the account in addition to the month
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,108
Members
452,302
Latest member
TaMere

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