Figures based on month selection

Salamullah

Board Regular
Joined
Mar 28, 2011
Messages
221
Hi Experts - Please give any formula

I want to get the figures in row 3 for each month based on selection of month in cell A1 as per the given example below, in Mar and Apr figures are showing zero
Suppose if I select Mar in A1 only Apr should show zero rest of the months should take sum from array F6:G11

Feb
JanFebMarApr
Sales20040000
MonthSales
Jan
200
Feb100
Feb300
Mar500
Mar100
Apr1000

<tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
if I select Mar in A1 only Apr should show zero and not May, June etc ...?



 
Upvote 0
Let's assume data Month/sales is in range K2 to L15
Months name are in range O1 : O12 = Jan, Feb, MAr ...Nov, Dec
B4 = =IF(MATCH(B2,$O$1:$O$12,0)<=MATCH($A$1,$O$1:$O$12,0),SUMPRODUCT(($K$2:$K$15=B2)*($L$2:$L$15)),0)
Copy and paste until the last column of display .. E4
 
Upvote 0
I have used the below with your given formula, only the issue its giving FALSE instead of Zero. What I am missing ?

Feb
JanFebMarAprMay
Sales 1,239,737 2,793,474FALSEFALSEFALSE

<colgroup><col><col span="5"></colgroup><tbody>
</tbody>

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=IF(MATCH(E5,$E$5:$P$5,0)<=MATCH($A$3,$E$5:$P$5,0),SUMIFS(Table_Query_from_TB3[SDITVL],Table_Query_from_TB3[Month],E$5,Table_Query_from_TB3[SDAN8],Sales!$F$8))

[/FONT]
 
Upvote 0
=IF(MATCH(E5,$E$5:$P$5,0)<=MATCH($A$3,$E$5:$P$5,0),SUMIFS(Table_Query_from_TB3[SDITVL],Table_Query_from_TB3[Month],E$5,Table_Query_from_TB3[SDAN8],Sales!$F$8),0)
 
Upvote 0
It seems was missing the end of the formula when you copied it...!
You know that instead of using text for month name ( e.g. Jan, Feb ...) you coukd use date ( 1/1/2019) and format the cell to display only the month: Custom Format Type "mmm"
It will be more simple.
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,825
Members
449,096
Latest member
Erald

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