Forum

Notifications
Clear all

Return a result based on cell contents

4 Posts
3 Users
0 Reactions
144 Views
Katherine Williams
(@katherinew)
Posts: 17
Eminent Member
Topic starter
 

I'm trying to write a formula that will give me an equation result based on whether or not a cell contains the words "Top Mount".  If the cell does not contain those words, then I want to return a response from a list on a different tab.  Please see the example below:

 

If C38,"Top Mount",(E5*2+G5*2)*2,=sumproduct((Lists!$A$1:$A$10=i38)*Lists!$B$1:$B$10)

 

The formula after =sumproduct works just fine, I just need to know how to tie in the first portion of the formula.  If that made sense to ANYONE, I would really appreciate your help!!  Lol

 

Thank you!

 
Posted : 04/05/2021 3:32 pm
(@questvba)
Posts: 125
Estimable Member
 

Hi Katherine,

Pour savoir si ta cellule contient un mot, tu peux utiliser cette formule :

=IF(COUNTIF(C38,"*Top Mount*"),"OK","NOK") 

BR,

Lione

 
Posted : 05/05/2021 12:12 am
(@debaser)
Posts: 836
Member Moderator
 

If you mean that C38 equals "Top Mount" then you can simply use:

 

=If(C38="Top Mount",(E5*2+G5*2)*2,sumproduct((Lists!$A$1:$A$10=i38)*Lists!$B$1:$B$10))

 

If you want to check if C38 contains Top Mount somewhere within it, you could use SEARCH:

 

=If(ISNUMBER(SEARCH("Top Mount",C38)),(E5*2+G5*2)*2,sumproduct((Lists!$A$1:$A$10=i38)*Lists!$B$1:$B$10))

 

Note that SEARCH returns either the position the text was found at or an error, which is handled by ISNUMBER.

 
Posted : 05/05/2021 4:41 am
Katherine Williams
(@katherinew)
Posts: 17
Eminent Member
Topic starter
 

Thank you everyone for your help!!  I am very grateful!!!

 
Posted : 05/05/2021 10:39 am
Share: