CountIf formula

rashid67

New Member
Joined
Oct 22, 2013
Messages
14
I want take Pivot table total and divide it by count of days in the month and spread amount across by date. Here is example

# of days count = 10 *** # of days count will change each week so the formula should adjust accordingly
Amount = 5000 **** $50,000/10 should be spread only up to Apr 10 in this example, onward it should zero

[TABLE="width: 960"]
[TR]
[TD="class: xl65, width: 64, align: right"]4/01/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/02/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/03/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/04/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/05/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/06/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/07/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/08/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/09/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/10/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/11/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/12/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/13/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/14/18[/TD]
[TD="class: xl65, width: 64, align: right"]4/15/18[/TD]
[/TR]
[TR]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[/TABLE]

Thanks,
Rashid
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Assuming your data looks something like this:
[TABLE="width: 912"]
<colgroup><col><col span="10"><col span="3"></colgroup><tbody>[TR]
[TD="align: right"]50000[/TD]
[TD] [/TD]
[TD="align: right"]4/1/2018[/TD]
[TD="align: right"]4/2/2018[/TD]
[TD="align: right"]4/3/2018[/TD]
[TD="align: right"]4/4/2018[/TD]
[TD="align: right"]4/5/2018[/TD]
[TD="align: right"]4/6/2018[/TD]
[TD="align: right"]4/7/2018[/TD]
[TD="align: right"]4/8/2018[/TD]
[TD="align: right"]4/9/2018[/TD]
[TD="align: right"]4/10/2018[/TD]
[TD="align: right"]4/11/2018[/TD]
[TD="align: right"]4/12/2018[/TD]
[/TR]
[TR]
[TD="align: right"]4/10/2018[/TD]
[TD] [/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]5000[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]

you can do this in cell C2 and copy across.

=IF(C1<=$A$2,$A$1/DAY($A$2),0)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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