ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to compare a date with financial year (https://www.excelbanter.com/excel-discussion-misc-queries/137204-how-compare-date-financial-year.html)

TUNGANA KURMA RAJU

How to compare a date with financial year
 
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.

Max

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.


JE McGimpsey

How to compare a date with financial year
 
One way:

Since you didn't tell us when your financial year starts, I'll assume
it's 1 April to 31 March. Adjust (e.g., the 3) as necessary.

=IF(YEAR(DATE(YEAR(A2),MONTH(A2)-3,1)) = --LEFT(B2,4),"B2 Financial
Year", "Not B2 Financial Year")




In article ,
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.


TUNGANA KURMA RAJU

How to compare a date with financial year
 
Thank you both of you.Both are great...

"JE McGimpsey" wrote:

One way:

Since you didn't tell us when your financial year starts, I'll assume
it's 1 April to 31 March. Adjust (e.g., the 3) as necessary.

=IF(YEAR(DATE(YEAR(A2),MONTH(A2)-3,1)) = --LEFT(B2,4),"B2 Financial
Year", "Not B2 Financial Year")




In article ,
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.




All times are GMT +1. The time now is 12:55 AM.

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