megera716
Board Regular
- Joined
- Jan 3, 2013
- Messages
- 146
- Office Version
- 365
- Platform
- Windows
I started out writing a different post, realized I was overthinking that and forgot to change the subject. I guess I just need it to return ONE date
We pay some large invoices on our corporate credit card and pay the card on the 25th of each month. If we charge something on January 26, it will be included in the payment leaving our bank account on February 25. If we pay something on February 24, that is also going out on February 25 (for the sake of simplicity, let's assume this hypothetical charge also cleared on the 24th). (We strategically time our charges to maximize "float" ). I am trying to capture when cash will leave the bank for these invoices charged to the card.
T2 contains the invoice due date in MM/DD/YYYY (which is theoretically also the day we will pay it on the card).
In U2, I got as far as (not knowing how to write the result for if FALSE, I just finished it with a blank "")
=IF(DAY(T2)<=24,DATE(YEAR(T2),MONTH(T2),DAY(25)),"")
The invoice was due on 1/10/2024, so it should have returned 1/25/2024, but it returned 1/24/2024?
But if an invoice due date (column T) is the 25th or later of any given month, U2 should return the 25th of the next month and I'm struggling with that. EOMONTH+1 and subtract days?
We pay some large invoices on our corporate credit card and pay the card on the 25th of each month. If we charge something on January 26, it will be included in the payment leaving our bank account on February 25. If we pay something on February 24, that is also going out on February 25 (for the sake of simplicity, let's assume this hypothetical charge also cleared on the 24th). (We strategically time our charges to maximize "float" ). I am trying to capture when cash will leave the bank for these invoices charged to the card.
T2 contains the invoice due date in MM/DD/YYYY (which is theoretically also the day we will pay it on the card).
In U2, I got as far as (not knowing how to write the result for if FALSE, I just finished it with a blank "")
=IF(DAY(T2)<=24,DATE(YEAR(T2),MONTH(T2),DAY(25)),"")
The invoice was due on 1/10/2024, so it should have returned 1/25/2024, but it returned 1/24/2024?
But if an invoice due date (column T) is the 25th or later of any given month, U2 should return the 25th of the next month and I'm struggling with that. EOMONTH+1 and subtract days?