Formula for return X value if there is ANY text in a cell, otherwise return text in another cell
Hi! I am working on a formula for a sheet that has a product column, a Use Cases column and a Tool column. I'm hoping to use a formula that says, "Look in the Use Cases column for any text. If you find text, return a "Use Case" in the Product column. If you can't find any words, then return the value in the Tool column in the Product column.
I was using the =IF(CONTAINS("a", [Use Cases]@row), "Use Case") formula.. but it's not quit there for two reasons:
- it the Use Cases column doesn't have a letter "a" then it will error out (row 7 as an example)
- I don't know how to write an exemption to the formula to return the "Tool" if the Use Cases column is blank.
In the image below, Row one of the sample, I would want it to return "Tool A" and using the current formula, row 7 won't return anything because it doesn't have an "a" in the Use Cases column.
What is the correct formula?
Thank you for the help!
Best Answer
-
Oops, sorry about that. How about this one?
=IF([Use Cases]@row <> "", "Use Case", Tool@row)
Answers
-
Hi @Bria Berger
Here is the formula I think you want:
=IF([Use Cases]@row <> "", [Use Cases]@row, Tool@row)
This says if the value in the Use Case column is not blank, return that value, if it is blank, then return the value in the Tool column.
I hope that helps.
Matt
-
Thanks so much for the quick reply, @Matt Johnson! this is close!! I would rather it say, "Use Case" instead of whatever text is in "Use Case Column".
-
Oops, sorry about that. How about this one?
=IF([Use Cases]@row <> "", "Use Case", Tool@row)
-
@Matt Johnson - you are my hero!!! It's working perfectly. Thanks so much!!!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!