Month is filtered and previous month are zeroed

joetejas

New Member
Joined
Feb 5, 2019
Messages
17
Hello,
I have columns Jan-Dec 2019 with a IF formula already in the cells. I need to figure out how to enter a formula that can zero out the previous month when selected, but keep the rest of the years data.
For example when I filter to Mar, the current data stays and Jan&Feb will equal to zero.
The month is filtered from another tab.

R82HDmSa5gLPgAAAABJRU5ErkJggg==



thanks in advance
 
Highlighted in red is what was added today.
=IF(BD3='Market Input'!$J$1,IF($I4="Other - Explain in Comments",((AD4-$AC4)/$AC4)*P4,IF(AP4>0,((P4*AP4*((AD4-$BB4)/$BB4))+(((VLOOKUP($C4,'Market Input'!$G:$AL,BD$1,FALSE)-$BB4)/$BB4)*P4*(1-AP4))),((VLOOKUP($C4,'Market Input'!$G:$AL,BD$1,FALSE)-$BB4)/$BB4)*P4)),0)

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 29.00 30.00 31.00

these values are already there for referencing other formulas.
Again when the selector selects a month have that month and future month present data in the cells.
and previous month(s) read zero
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Ok, so it's hard to follow what ranges and references you're using in your formula. Here's a sample of what i did to show how the formula works:

A1BCDEFGHIJ
2Validation TestTest data
3MarJan105
4Feb205
5Mar3605
6Apr4605
7May5605
8Jun6605
9Jul7605
10Aug8605
11Sep9605
12Oct10605
13Nov11605
14Dec12605
15

<tbody>
</tbody>

<tbody>
</tbody>

The formula is: =IF(E3<Vlookup($b$3,$d$3:$E$14,2,false),0,Sum($i$3:$i$14))<vlookup($b$3,$d$3:$e$14,2,false),0,sum($i$3:$i$14))


Highlighted in red is what was added today.
=IF(BD3='Market Input'!$J$1,IF($I4="Other - Explain in Comments",((AD4-$AC4)/$AC4)*P4,IF(AP4>0,((P4*AP4*((AD4-$BB4)/$BB4))+(((VLOOKUP($C4,'Market Input'!$G:$AL,BD$1,FALSE)-$BB4)/$BB4)*P4*(1-AP4))),((VLOOKUP($C4,'Market Input'!$G:$AL,BD$1,FALSE)-$BB4)/$BB4)*P4)),0)

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 29.00 30.00 31.00

these values are already there for referencing other formulas.
Again when the selector selects a month have that month and future month present data in the cells.
and previous month(s) read zero
</vlookup($b$3,$d$3:$e$14,2,false),0,sum($i$3:$i$14))
 
Last edited:
Upvote 0
This is extremely hard to explain.
The selector is for Mar. The data stays put and Jan/Feb are 0. it almost seems like I can either add a =IF(BD3='Market Input'!$J$1,(AND.... keeping the APR-DEC data static.
JanFebMarApr
$0$0($108,945)($79,364)

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

Baseline Month



Mar

<colgroup><col width="118"><col width="4"><col width="5"><col width="76"><col width="60"></colgroup><tbody>
</tbody>
Selector above, data validation is only months.
I also tried playing with the selector to see if it could keep the current month while populating other data so the formula knows what to keep when selected.

=IF(BD3='Market Input'!$J$1,IF($I4="Other - Explain in Comments",((AD4-$AC4)/$AC4)*P4,IF(AP4>0,((P4*AP4*((AD4-$BB4)/$BB4))+(((VLOOKUP($C4,'Market Input'!$G:$AL,BD$1,FALSE)-$BB4)/$BB4)*P4*(1-AP4))),((VLOOKUP($C4,'Market Input'!$G:$AL,BD$1,FALSE)-$BB4)/$BB4)*P4)),0)
 
Upvote 0

Forum statistics

Threads
1,215,403
Messages
6,124,714
Members
449,182
Latest member
mrlanc20

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