Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default IF function and date range

I need the syntax for writing an IF function that can search a colum to see
if a date falls into a range. Ex: IF(D16= a date in jan 2009, true, false).

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default IF function and date range

If you are just checking for month/year inclusions, you don't need to use a
range...

=IF(AND(MONTH(D16)=1,YEAR(D16)=2009),TRUE,FALSE)

Also, if all you want from the comparison is TRUE or FALSE, you don't need
the IF statement... the first argument to the IF statement evaluates to TRUE
or FALSE (that is how the function knows which of the next two arguments to
pick, so you can just use the first argument all by itself...

=AND(MONTH(D16)=1,YEAR(D16)=2009)

--
Rick (MVP - Excel)


"Hummel Guy" wrote in message
...
I need the syntax for writing an IF function that can search a colum to see
if a date falls into a range. Ex: IF(D16= a date in jan 2009, true,
false).

Thanks


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
IF function and date range Gary''s Student Excel Programming 0 June 4th 09 03:03 PM
Countif function - using a date range Exceluser1 Excel Worksheet Functions 9 October 4th 08 10:30 AM
MAX figure within a date range as a function of today()'s date irvine79 Excel Worksheet Functions 6 February 20th 07 03:28 PM
SUMIF within date range as a function of today()'s date irvine79 Excel Worksheet Functions 8 August 6th 06 05:55 PM
How to use Date range function in Sum(if....) Murugan Excel Discussion (Misc queries) 3 August 4th 06 11:58 PM


All times are GMT +1. The time now is 03:22 AM.

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

About Us

"It's about Microsoft Excel"