# Add onto existing formula IF does not contain "text" then apply a different calculation

#### Kelli Webb

##### Member
Hello,

I have figured out half of the formula, but I've been unable to add figure out the last criteria based on text, that if it contains "Text" do a different calculation.

I am perplexed that we pay for a system i.e. Payroll, and yet at the end of the day it still comes down to excel ninja's.

Thank you, I would be lost without each and everyone of you!

Kelli

#### Attachments

• 23.4 KB Views: 7

#### deciog

##### Active Member
Try this way

=IF(ISNUMBER(SEARCH("long*",C4,1)),IF(D4=0,0,D4+E4),D4+E4)

Decio

#### Peter Bartholomew

##### Well-Known Member
Sticking with the SUMIFS
= @Entitlement + @Accrued - SUMIFS(@Entitlement, @LveType, "Long*", @Entitlement, 0 )
= \$D4 + \$E4 - SUMIFS( \$E4,\$C4, "Long*", \$D4,0 )
[with and without Names and 365]

#### pecoflyer

##### Active Member
Try this way

=IF(ISNUMBER(SEARCH("long*",C4,1)),IF(D4=0,0,D4+E4),D4+E4)

Decio
I haven't checked if the formula works but it seems you have too many arguments
=IF(ISNUMBER(SEARCH("long*",C4,1)),IF(D4=0,0,D4+E4))

#### deciog

##### Active Member
pecoflyer

Your formula is not working correctly

Decio

#### bosco_yip

##### Excel Ninja
Or,

=IF((LEFT(C4,4)="long")*(D4=0),0,D4+E4)

Regards

#### Kelli Webb

##### Member
A huge big thank you to All, you all make it looks so easy. I'm not sure why I don't approach my formulas with a more simple approach.

Take care, Kelli