vivasuzi
Programmer
- Jun 14, 2002
- 183
I am having trouble with this and it's driving me nuts. I have a table (don't we all):
record record info record date
----------------------------------
blah blahblah 4/30/05
blah blahblah 5/30/05
blah blahblah 6/1/05
blah blahblah 7/30/05
I have one cell (E1) that shows todays date (Today() - currently it is 5/4/05)
I have a cell next to it with this formula:
=COUNTIF(D6
127,"<=E1")
That works, and gives me the right count of dates that have passed. In the above example it would give me "1"
Then I have a cell (E2) that shows todays date + 30 (Today()+30 - currently it is 6/3/05)
So I thought I could simply make this formula to calculate the dates between 6/3/05 and 5/4/05:
=COUNTIF(D6
127,"<=E2")-COUNTIF(D6
127,"<E1")
In the above example that would be "3-1" or "2"
However, it KEEPS GIVING me zero even though I KNOW there are 2 dates in the range. If I change E2 to 6/3/05 in the formula, I get the correct answer. However I want this to be dynamic. Does anyone know what is going wrong? I have the same range (E1-E2) in my conditional formatting and it works to change those 2 cells to yellow. Why won't this work in the calculation?
Any help/suggestions is appreciated. I really hope I made some stupid mistake b/c that way I know I'm not crazy :-D Thanks!
*Suzanne* ![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
![[wiggle] [wiggle] [wiggle]](/data/assets/smilies/wiggle.gif)
record record info record date
----------------------------------
blah blahblah 4/30/05
blah blahblah 5/30/05
blah blahblah 6/1/05
blah blahblah 7/30/05
I have one cell (E1) that shows todays date (Today() - currently it is 5/4/05)
I have a cell next to it with this formula:
=COUNTIF(D6
That works, and gives me the right count of dates that have passed. In the above example it would give me "1"
Then I have a cell (E2) that shows todays date + 30 (Today()+30 - currently it is 6/3/05)
So I thought I could simply make this formula to calculate the dates between 6/3/05 and 5/4/05:
=COUNTIF(D6
In the above example that would be "3-1" or "2"
However, it KEEPS GIVING me zero even though I KNOW there are 2 dates in the range. If I change E2 to 6/3/05 in the formula, I get the correct answer. However I want this to be dynamic. Does anyone know what is going wrong? I have the same range (E1-E2) in my conditional formatting and it works to change those 2 cells to yellow. Why won't this work in the calculation?
Any help/suggestions is appreciated. I really hope I made some stupid mistake b/c that way I know I'm not crazy :-D Thanks!
![[cat2] [cat2] [cat2]](/data/assets/smilies/cat2.gif)
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
![[wavey] [wavey] [wavey]](/data/assets/smilies/wavey.gif)
![[wiggle] [wiggle] [wiggle]](/data/assets/smilies/wiggle.gif)