Formula to update data each month

RobbieH

New Member
Joined
Feb 14, 2019
Messages
2
Need a formula, or possibly a macro if necessary, to execute the following based on the current month:

If the current month is January then if B1<E1 then D1=""; if B1>E1 then D1=
E1-
A1.
Cell D2 would be if B1+B2<E1 then D2=""; if
B1+B2>E1 then D2=
E1-
(B1+B2).
Cell D3 would be if B1+B2+B3<E1 then D3=""; if B1+B2+B3>E1 then D3=
E1-
(B1+B2+B3) etc., etc.,

EX: D1="", D2="", D3=-0.01
A B C D E
1 January 0.20 1
2 February 0.65
3 March 0.25
….
8 August 0.30
9 September 0.45
10 October 0.25
11 November 0.20
12 December 0.25

When the current month is February, I need to see February-July with January & August-December blank etc. etc. etc. The problem I keep encountering is when current month is August, I need data for August -January with Feb-July blank. The rollover is what gets me. The other kicker is the data for column B gets updated the 1st of each month to reflect the next 12 months so right now the data shows Feb 2019 through Jan 2020.

HELP, please!!!!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
The formating changed from when I was typing this to when it submitted. "January" is A1, 0.20=B1, C1="", D1=the result, E1=manually input number (not always 1). Tried submitting screenshot and it didn't work either.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

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