[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 247

# If statement error

Experts
Can you tell me what is wrong with this formula?
It just states "the formula you typed contains an error"
I think it is a parenthesis but I have tried many combinations to no avail.

=IF(GTExpireDate<FacilityExpirationDate),(SUM(MID(\$D\$15,SEARCH({"mon","day"},\$D\$15)-3,2)*{30,1}),"Expires After Facility Expiration")))

thank you
0
pdvsa
1 Solution

Sr. System AnalystCommented:
looks like you should remove first )

=IF(GTExpireDate<FacilityExpirationDate),(SUM(MID(\$D\$15,SEARCH({"mon","day"},\$D\$15)-3,2)*{30,1}),"Expires After Facility Expiration")))

-->

=IF(
GTExpireDate<FacilityExpirationDate,
SUM(MID(\$D\$15,SEARCH({"mon","day"},\$D\$15)-3,2)*{30,1}),"Expires After Facility Expiration")
)
0

Commented:
try it like this. your brackets were misplaced

=IF((GTExpireDate<FacilityExpirationDate),SUM(MID(\$D\$15,SEARCH({"mon","day"},\$D\$15)-3,2)*{30,1}),"Expires After Facility Expiration")
0

Commented:
Not for points....

Wass7's version should work for you but there's still a redundant pair of parentheses - this should be sufficient

=IF(GTExpireDate<FacilityExpirationDate,SUM(MID(\$D\$15,SEARCH({"mon","day"},\$D\$15)-3,2)*{30,1}),"Expires After Facility Expiration")

regards, barry

0

Author Commented:
yes, there was a redudant set of ).  Excel did catch it and I forgot to mention this.

thank you.
0

Sr. System AnalystCommented:
looks like I did not see the other )

=IF(GTExpireDate<FacilityExpirationDate),(SUM(MID(\$D\$15,SEARCH({"mon","day"},\$D\$15)-3,2)*{30,1}),"Expires After Facility Expiration")))

-->

=IF(
GTExpireDate<FacilityExpirationDate,
SUM(MID(\$D\$15,SEARCH({"mon","day"},\$D\$15)-3,2)*{30,1}),
"Expires After Facility Expiration"
)
0

## Featured Post

Tackle projects and never again get stuck behind a technical roadblock.