Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 171
Default 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.
  #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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 171
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get Excel to automatically calculate salaries actually received in financial year? Kei Excel Discussion (Misc queries) 0 March 3rd 06 11:26 AM
year function and financial years Martin_London Excel Worksheet Functions 5 December 6th 05 12:20 AM
Year-to-date year to date formula Philm Excel Worksheet Functions 1 October 7th 05 02:50 AM
How to compare current year to prior year in bar chart? substring Charts and Charting in Excel 4 May 12th 05 07:04 PM
Weeknum Year by Year Compare RJB Charts and Charting in Excel 4 December 29th 04 11:33 PM


All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"