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

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

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
Asked:
pdvsa
1 Solution
 
HainKurtSr. 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
 
Wass7Commented:
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
 
barry houdiniCommented:
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
 
pdvsaAuthor Commented:
yes, there was a redudant set of ).  Excel did catch it and I forgot to mention this.  

thank you.
0
 
HainKurtSr. 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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