Macro to calculate billing amounts based on dates

dfuhrman08

New Member
Joined
May 6, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have trying to work on a macro that would give me billing amounts based on a subscription start date and the annual fee.
Column J has the annual subscription start date
Column L has the Annual fee paid.

January billing - Column M is where I am needing to calculate the fee for 1/1(current year)-6/30(current year)
July Billing - Column N is where I am needing to calculate the fee for 7/1(current year)-12/31(current year)

For January billing, if current year>start date year, then January billing (Column M) needs to equal Annual fee paid. (Column L)
If current year is <= start date year, then January billing (Column M) needs to be zero.
If Current year = start date year, then if start date month >6, then January Billing = zero. Else, January Billing = (Annual Fee/12)*(7-Month(Start Date)

For July Billing, if current year>start date year, then July billing(Column N) equals Annual Fee(Column L)/2
If current year<year start date, then July billing = zero
If current year =Year(start date) then if month(Start date)<7, then July billing = (Annual Fee/2), else July billing = (Annual Fee/12)*(13-Month(start date))

I just cannot get my formula or macro correctly written to figure these two columns of finding January and July Billing.
Any help that I can get would be appreciated.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,214,833
Messages
6,121,862
Members
449,052
Latest member
Fuddy_Duddy

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