View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave H[_3_] Dave H[_3_] is offline
external usenet poster
 
Posts: 8
Default Today() and IF Function

Bingo, that was it. Many Thanks, I appreciate the help

"David Biddulph" wrote:

I assume that your AY column doesn't contain the text string "1", so that's
why your answer is always blank.
If you want to test for the number 1, don't put quotes mark around it.
The formula given was when you said you were looking for x. x is a text
value so needs quote marks around it in the formula. 1 might be either text
or a number, but by default it would be a number, and thus doesn't want
quote marks.
--
David Biddulph

"Dave H" wrote in message
...
It accepts the formula without error but comes up blank in all cases.
This is a cut and paste example:

AY AZ BA
1 9/1/2008 4000
1 11/15/2008 4005
2 11/1/2008 4010

=IF(AND(AY522="1",AZ522-TODAY()<=180),BA522,"")
Is date formatting an issue?

Thanks


"Teethless mama" wrote:

=IF(AND(A2="x",B2-TODAY()<=180),C2,"")


"Dave H" wrote:

Hello,
I'm trying to set up a formula to return cell C2 if A2 is x and B2 is
within
180 days of todays date. Ex:
A B C
1 9/1/08 45784

This is what I've tried:

=IF(A2=x & IF(B2-Today()<=180),C2,"")

Any hints would be appreciated.

Dave