Southsider
Registered User.
- Local time
- , 22:28
- Joined
- Oct 25, 2012
- Messages
- 19
I am trying to find the earliest date out of 6 different date fields (some of which may be null). I found this article on the Microsoft Site (support.microsoft.com/kb/182760) that helped me create a module so I have a function called Minimum and Maximum that seems very easy to use, and in fact it does work except for one BIG problem. If one of the fields it's looking at is Null, the calculated field also becomes null. I want it to ignore the null fields and pick the lowest value of the fields that aren't null. I'm not sure how to do this. I'm guessing I have to edit the module somehow. Anyway, here's the formula for my calculated field:
First Result Date: Minimum([Date1],[Date2],[Date3],[Date4],[Date5],[Date6])
I think the other option is to make an elaborate If statement, based on something like this:
Iif([fieldA]<[FieldB],[fieldA],[fieldB])
IIf(((IIf([fieldA]<[fieldB],[fieldA],[fieldB])))<[fieldc],((IIf([fieldA]<[fieldB],[fieldA],[fieldB]))),[fieldc])
Obviously that's a few fields short. I guess I'd prefer to use the first solution if possible.
Thanks for any help, I greatly appreciate it.
First Result Date: Minimum([Date1],[Date2],[Date3],[Date4],[Date5],[Date6])
I think the other option is to make an elaborate If statement, based on something like this:
Iif([fieldA]<[FieldB],[fieldA],[fieldB])
IIf(((IIf([fieldA]<[fieldB],[fieldA],[fieldB])))<[fieldc],((IIf([fieldA]<[fieldB],[fieldA],[fieldB]))),[fieldc])
Obviously that's a few fields short. I guess I'd prefer to use the first solution if possible.
Thanks for any help, I greatly appreciate it.