JamesTrory
8 years agoQrew Assistant Captain
WeekdayAdd used with IF function
Hi,
I'm using the below formula in a field called [Due in OTMM] to return the date of the field [To MRC] with the addition of 5 business days:
WeekdayAdd(ToDate([To MRC]),5)
But what I'd really like it to do is create a series of IF functions in [Due in OTMM] so that different dates in this field can be displayed depending on the results of other fields. For example:
If (
[To MRC]>[From MRC],WeekdayAdd(ToDate([To MRC]),5),
[To OTMM]>[Date Imported],WeekdayAdd(ToDate([To OTMM]),2),
"")
The above would ideally return two different results, either:
Unfortunately this returns the error "The types of the arguments or the number of arguments supplied do not meet the requirements of the function If". I've tried Case and that doesn't work either. Is there a way to use WeekdayAdd with the IF function, or do I just have the formula wrong?
I'm using the below formula in a field called [Due in OTMM] to return the date of the field [To MRC] with the addition of 5 business days:
WeekdayAdd(ToDate([To MRC]),5)
But what I'd really like it to do is create a series of IF functions in [Due in OTMM] so that different dates in this field can be displayed depending on the results of other fields. For example:
If (
[To MRC]>[From MRC],WeekdayAdd(ToDate([To MRC]),5),
[To OTMM]>[Date Imported],WeekdayAdd(ToDate([To OTMM]),2),
"")
The above would ideally return two different results, either:
- Five days added to [To MRC] but only if the date in [To MRC] is greater than in [From MRC]
OR if that isn't true - Two days added to [To OTMM] only if the date in [To OTMM] is greater than [Date Imported].
Unfortunately this returns the error "The types of the arguments or the number of arguments supplied do not meet the requirements of the function If". I've tried Case and that doesn't work either. Is there a way to use WeekdayAdd with the IF function, or do I just have the formula wrong?