Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Doing date Comparisons in Excel 1

Status
Not open for further replies.

scroce

MIS
Nov 30, 2000
780
US
I think this is pretty self explanatory - I know that the syntax is wrong - but can someone point me in the correct direction of what i'm trying to do here?

Public Function FiscalYear(MyDate) As String


Select Case MyDate

Case #7/1/1998# > MyDate > #6/30/1999#
FiscalYear = "FY98"
Case #7/1/1999# > MyDate > #6/30/2000#
FiscalYear = "FY99"
Case #7/1/2000# > MyDate > #6/30/2001#
FiscalYear = "FY00"
Case Else
FiscalYear = "Not Found!"

End Select How much more water would there be in the ocean if it weren't for sponges?
 
Hi,
Use
Code:
    Case #7/1/1998# To #6/30/1999#
hope this helps :) Skip,
metzgsk@voughtaircraft.com
 
Thanks Skip.

What a sad world it would be without tek-tips How much more water would there be in the ocean if it weren't for sponges?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top