Forum Discussion

Tatiana Torres's avatar
Tatiana Torres
Copper Contributor
Sep 13, 2018

help with complex formula involving dates

I need to change the formula in the column labeled "Invoice Month" (see screen shot). Currently it's this: =CHOOSE(MONTH(D3),"January","February","March","April","May","June","July","August","September","October","November","December")

 

However, it turns out that we process our monthly expenses based on when the credit card statements are due. Specifically, our credit card statements are from the 23rd to the 22nd of the following month (so for example: if a purchase is made on 4/21 and then another is made on 4/25, the first purchase is processed for the month of April, but the second purchase is processed for the month of May). 

 

What i'd like to know is if there is a formula (or VBA code??) that would choose the month based on it falling in between those dates of each month. Is this possible? 

  • Hi Tatiana,

    Perhaps instead of MONTH(D3) you may use

    MONTH(D3)+(DAY(D3)>22)

    in your formula

     

Resources