How to determine the value?

E

Eric

If today is the last day of this month, then return today+2, else today.
Does anyone have any suggestions on how to determine whether today is the
last day of this month or not?
Thanks in advance for any suggestions
Eric
 
J

Joe User

Eric said:
If today is the last day of this month, then return today+2, else today.
Does anyone have any suggestions on how to determine whether today
is the last day of this month or not?

Two ways....

=if(today()=eomonth(today(),0), 2+today(), today())

If you get a #NAME error, look at the Help page for EOMONTH for
instructions.

If you cannot or do not want to install the ATP (for Excel 2003, at least),
replace EOMONTH(TODAY(),0) with DATE(YEAR(TODAY()),1+MONTH(TODAY()),0).

Of course, you can avoid all the calls to TODAY() by putting =TODAY() into
some cell and referencing it instead in the formula above.
 
O

ozgrid.com

=IF(A1=EOMONTH(A1,0),TODAY()+2,TODAY())

See help for EMONTH if returns #NAME as you may need to check the add-in.
 
T

T. Valko

Try this...

A1: =TODAY()

=A1+((A1=EOMONTH(A1,0))*2)

Note that the EOMONTH function requires the Analysis ToolPak add-in be
installed if you're using a version of Excel prior to Excel 2007. If you
enter the formula and get a #NAME? error look in Excel help for the EOMONTH
function. It'll tell you how to fix the problem.
 
B

Bernd P

Hello Eric,

I suggest to use the formula
=TODAY()+2*(MONTH(TODAY())<>MONTH(TODAY()+1))

Regards,
Bernd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top