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
- Smartsheet Customer Resources
- 62.4K Get Help
- 364 Global Discussions
- 201 Industry Talk
- 430 Announcements
- 4.4K Ideas & Feature Requests
- 137 Brandfolder
- 129 Just for fun
- 128 Community Job Board
- 446 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 284 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!