View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to compare a date with financial year

example: cell a2=05-May-2007 and cell B2=2007-08

Assuming the financial year runs from 1-Apr (this year) to 31 Mar (next
year), then one way to test for it, in say C2:
=AND(A2=DATE(LEFT(B2,SEARCH("-",B2)-1),4,1),A2<DATE(LEFT(B2,SEARCH("-",B2)-1)+1,4,1))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"TUNGANA KURMA RAJU" wrote:
I have a date in a cell and financial year in another cell.How to compare
whether that date exists in that financial year?.
example: cell a2=05-May-2007 and cell B2=2007-08.
What function will tell that a2 date exists in b2 financial year.