I want to write a formula to return one of 2 cell values
Hello,
I have 3 cells in play here. Cell 1 is a formula pulling a value from "Grid A". Cell 2 is pulling a value from "Grid B". There is typically either going to be a value in cell 1 OR a value in cell 2, which means one of those 2 cells likely says "NO MATCH". How can I teach column 3 to pull in the value for the cell that does not say "NO MATCH". I've tried this with no luck (simplified the cell names for this post):
=IF([Cell1]@row CONTAINS("MATCH",[Cell1]@row),[Cell2]@row,[Cell1@row
Thanks,
Best Answer
-
Is the NO MATCH an error, or an output from your formula?
If it's an output from your formula, you can actually simplify this by removing the "Contains" portion.
Try this:
=IF([Cell1]@row = "NO MATCH", [Cell2]@row, [Cell1]@row)
If the NO MATCH is the error, you may want to wrap an IFERROR statement around your formulas in Cells 1 and 2 so that there's a specific output when there's no Match. (See Here for information on IFERROR statements).
Let me know if this works for you!
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Answers
-
Is the NO MATCH an error, or an output from your formula?
If it's an output from your formula, you can actually simplify this by removing the "Contains" portion.
Try this:
=IF([Cell1]@row = "NO MATCH", [Cell2]@row, [Cell1]@row)
If the NO MATCH is the error, you may want to wrap an IFERROR statement around your formulas in Cells 1 and 2 so that there's a specific output when there's no Match. (See Here for information on IFERROR statements).
Let me know if this works for you!
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Thank you! It was the former issue (I removed CONTAINS). Good to go now!
-
Glad it works for you now! 🙂
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!