I want to compare months - as in auto inspections - and calculate.

A

Alcazz

I have a worksheet that compares a date to the today() function - but I just
want to compare months - similar to comparing car safety inspection due
months to today(). As with a car the inpsection is not late until the end of
the month. There must be an easy way to do this.
 
J

John Vinson

I have a worksheet that compares a date to the today() function - but I just
want to compare months - similar to comparing car safety inspection due
months to today(). As with a car the inpsection is not late until the end of
the month. There must be an easy way to do this.

I'm sure there is; but since you're using the spreadsheet program
Excel (it would seem), you might want to ask the question in a
newsgroup supporting Excel. This newsgroup is for the database program
Microsoft Access.


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
G

Guest

-----Original Message-----
I have a worksheet that compares a date to the today() function - but I just
want to compare months - similar to comparing car safety inspection due
months to today(). As with a car the inpsection is not late until the end of
the month. There must be an easy way to do this.
.
have you tried Monthname(Month(Date))
 
Y

Yanick

Use this formula or something like this :

IF(MONTH(TODAY()) = MONTH(F1),1,0)

Where F1 is the date to compare.
 
J

Jamie Collins

Use this formula or something like this :

IF(MONTH(TODAY()) = MONTH(F1),1,0)

Where F1 is the date to compare.

Surely you mean IIF e.g.

SELECT
MyDateTimeCol,
DATESERIAL(YEAR(NOW()), MONTH(NOW())+1,0)
AS last_day_of_current_month,
CBOOL(MyDateTimeCol<=DATESERIAL(YEAR(NOW()), MONTH(NOW())+1,0))
AS is_late
FROM
[Excel 8.0;HDR=YES;Database=C:\Alcazz.xls;].[MySheet$]
;

Jamie.

--
 
Top