Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default nested if for a range of dates

I am using Excel 2003 to work on a range of dates. If the date is blank
(null) in a column, I need it to return a 1. Also, in that same column, if
the date is between a date range (we are using a fiscal year from 7-1-xxxx to
6-30-xxxx), I need it to return a 1. If the date in the column is outside
of the fiscal year, I need it to return a 0. We want it to sum the 1's and
0's so we can get a count (summing, of course, I can do!)

I want to expand this formula eventually, to cover other years, but I'd be
happy if I can just figure this part out.
Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default nested if for a range of dates

One formula

=SUMPRODUCT(--((B2:B1000="")+((B2:B1000=--"2007-07-01")*(B2:B1000<=--"2008-06-30"))))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"cjlatta" wrote in message
...
I am using Excel 2003 to work on a range of dates. If the date is blank
(null) in a column, I need it to return a 1. Also, in that same column,
if
the date is between a date range (we are using a fiscal year from 7-1-xxxx
to
6-30-xxxx), I need it to return a 1. If the date in the column is
outside
of the fiscal year, I need it to return a 0. We want it to sum the 1's
and
0's so we can get a count (summing, of course, I can do!)

I want to expand this formula eventually, to cover other years, but I'd be
happy if I can just figure this part out.
Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default nested if for a range of dates

Try this one:
=IF(OR(RefDate<DATE(RefYear,1,7),RefDateDATE(RefY ear,6,30)),0,1)
Explaining:
If the RefDate is outside the range 7-1-xxxx to 6-30-xxxx the formula will
return 0 and in the other case it will return 1.
I consider that RefDate is one range taht contains a date and RefYear is a
cell taht contain the number of the year I'll use to compair with date (ex.
2008, 2007, and so on).
--
Adilson Soledade


"cjlatta" wrote:

I am using Excel 2003 to work on a range of dates. If the date is blank
(null) in a column, I need it to return a 1. Also, in that same column, if
the date is between a date range (we are using a fiscal year from 7-1-xxxx to
6-30-xxxx), I need it to return a 1. If the date in the column is outside
of the fiscal year, I need it to return a 0. We want it to sum the 1's and
0's so we can get a count (summing, of course, I can do!)

I want to expand this formula eventually, to cover other years, but I'd be
happy if I can just figure this part out.
Thanks in advance.

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
Comparing Dates in 4 Columns - Nested Formulas? foofoo Excel Discussion (Misc queries) 2 October 11th 07 10:13 AM
Comparing Dates in 4 Columns - Nested Formulas? foofoo Excel Discussion (Misc queries) 1 October 11th 07 09:39 AM
HLP - Dynamic Range for Nested IF dee Excel Worksheet Functions 1 May 18th 07 12:06 AM
Identifying unique dates within a range of cells containing dates cdavidson Excel Discussion (Misc queries) 0 October 12th 06 08:19 PM
COMPARING DATES with nested IF not working- Syntax is correct though Richard Flame Excel Discussion (Misc queries) 2 July 12th 06 07:04 PM


All times are GMT +1. The time now is 06:35 PM.

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"