June 11, 2020
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!
Trusted Members
Moderators
November 1, 2018
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.
Answers Post
1 Guest(s)