ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I use "if statements" when working with dates? (https://www.excelbanter.com/excel-worksheet-functions/152665-how-do-i-use-if-statements-when-working-dates.html)

Statesman

How do I use "if statements" when working with dates?
 
I need...formula if the day of the current date is 10th, then due date will
be 10th of following month. Otherwise, due date will be 10th of current month.

Don Guillett

How do I use "if statements" when working with dates?
 
will this work?
=DATE(YEAR(G3),MONTH(G3)+IF(DAY(G3)<10,0,1),10)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Statesman" wrote in message
...
I need...formula if the day of the current date is 10th, then due date
will
be 10th of following month. Otherwise, due date will be 10th of current
month.



T. Valko

How do I use "if statements" when working with dates?
 
Try this:

=DATE(YEAR(TODAY()),MONTH(TODAY())+(DAY(TODAY())1 0),10)

--
Biff
Microsoft Excel MVP


"Statesman" wrote in message
...
I need...formula if the day of the current date is 10th, then due date
will
be 10th of following month. Otherwise, due date will be 10th of current
month.




T. Valko

How do I use "if statements" when working with dates?
 
Hmmm...

if the day of the current date is 10th

=DATE(YEAR(TODAY()),MONTH(TODAY())+(DAY(TODAY()) 10),10)


Hold on there just a second. Are you sure this is what you want? I think you
need a *static* "current date" to use as the comparison. Otherwise, the
formula I suggested will return a different result every 11th of the month.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

=DATE(YEAR(TODAY()),MONTH(TODAY())+(DAY(TODAY())1 0),10)

--
Biff
Microsoft Excel MVP


"Statesman" wrote in message
...
I need...formula if the day of the current date is 10th, then due date
will
be 10th of following month. Otherwise, due date will be 10th of current
month.







All times are GMT +1. The time now is 03:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com