Excel Formula Advise

lk200

New Member
Joined
Sep 11, 2016
Messages
3
I'm trying to figure out what would be the best formula to write for the "Shortfall" section


DatePeriodRevenueExpenseShortfall
7/1/201830(82,242)(82,242)
10/1/20184000
1/1/2019582,196(82,242)(47)
4/1/20196000
7/1/201970(81,745)(81,745)
10/1/20198000
1/1/2020989,404(81,745)7,659
4/1/202010000
7/1/2020110(81,002)(81,002)
10/1/202012000
1/1/202113106,043(81,002)25,041
4/1/202114000
7/1/2021150(79,701)(79,701)
10/1/202116000
1/1/202217112,140(1,324,701)(1,212,562)

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

This is the condition i'm trying to meet

1) If the "shortfall" is positive, I want to show 0, but I want that positive number to be applied to the next period when we have negative shortfall

So for example, 1/1/2020, we have positive number 7,659. I still want to show 0 for the period, but this positive number to be applied on 7/1/2021. So instead of 79,701, I want number to be "54,660"

Please advise and thanks for the inputs
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Just to be clear, why is the shortfall applied on 7/1/2021 ?
Why not on 7/1/2020 ?
Or, for that matter, 4/1/2020 ?

Also, are your dates DD/MM/YYYY or MM/DD/YYYY ?
 
Upvote 0
is this the formula you are looking for? you will need to replace the cells with the ones you are using

Code:
=IF(C1=D1,0,IF(C1>D1,C1-D1,D1-C1))


---EDIT---
It is a 'difference' code that will generate the difference between two values. In this case, C1 and D1.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,791
Messages
6,121,611
Members
449,038
Latest member
apwr

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