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)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
Are you able to provide some screenshots for context?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
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)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
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)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 213 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!