If Contains Formula
Hi there,
I need help with putting together these 2 formula's:
If "How does the Company make money or plan to do so?" selection does NOT include “Other” then show below:
[Name of Company] makes or plans to make money through [Other]
If "How does the Company make money or plan to do so?" selection does include “Other” then show below:
[Name of Company] makes or plans to make money through: [other] and through [Other].
Best Answer
-
You don't need the second IF at all. The 3rd portion of the IF statement is where you put your output for when the first argument is not true.
You have
=IF(CONTAINS(.....), ....., IF(NOT(CONTAINS(.....)), .....))
You only need
=IF(CONTAINS(.....), ....., .....)
It also looks like your syntax for the CONTAINS function is backwards.
You have
CONTAINS([search here]@row, "search for this")
You should have
CONTAINS("search for this", [search here]@row)
Answers
-
Are you able to provide some screenshots for context?
-
Sure, here is a screenshot for context:
If "How does the Company make money or plan to do so?" selection does NOT include “Other” then show below:
Context: if Other(please explain) is multiselected in the dropdown
Formula's I want to do:
If "How does the Company make money or plan to do so?" selection does NOT include “Other(Please Explain)” then show below:
[Name of Company] makes or plans to make money through ["How does the Company make money or plan to do so?"]
If "How does the Company make money or plan to do so?" selection does include “Other” then show below:
[Name of Company] makes or plans to make money through: [How does the Company make money or plan to do so?] and through [2a.Other].
Tags: Formulas
-
I have this formula:
=IF(CONTAINS([How does the Company make money or plan to do so?]@row, "Other (please explain)"), [Name of Company]@row + " makes or plans to make money through: " + [How does the Company make money or plan to do so?]@row + " and through " + [2a. Other]@row, [Name of Company]@row + " makes or plans to make money through: " + [How does the Company make money or plan to do so?]@row + ".")
But, It only answers part of the equation. I can't seem to figure out the does not contain.
-
@Brittanyy you would just need to use the 3rd portion (value if false) of the IF statement.
You are currently using
=IF(this is true, do this)
Just fill in the 3rd portion of the IF statement like so:
=IF(this is true, do this, otherwise do this)
-
I edited my formula below, but I am still getting an error.
=IF(CONTAINS([How does the Company make money or plan to do so?]@row, "Other (please explain)"), [Name of Company]@row + " makes or plans to make money through: " + [How does the Company make money or plan to do so?]@row + " and through " + [2a. Other]@row. IF(NOT(CONTAINS([How does the Company make money or plan to do so?]@row, "Other (please explain)")+([Name of Company]@row + " makes or plans to make money through: " + [How does the Company make money or plan to do so?]@row + ".")
-
You don't need the second IF at all. The 3rd portion of the IF statement is where you put your output for when the first argument is not true.
You have
=IF(CONTAINS(.....), ....., IF(NOT(CONTAINS(.....)), .....))
You only need
=IF(CONTAINS(.....), ....., .....)
It also looks like your syntax for the CONTAINS function is backwards.
You have
CONTAINS([search here]@row, "search for this")
You should have
CONTAINS("search for this", [search here]@row)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!