If then formula
How do I set up a formula so that if([column A]@row="something", copy the value in [Column B]@row to [Column C]@row,""). I appreciate any help you can offer.
Answers
-
Hi @LinMyers
You could put a formula like this in Column C
=IF([column A]@row="something",[column B]@row)
This will return the value in column B only if the value in Column A is "something". If the value in Column A is not "something", then column C will be blank.
It won't be a strict "copy" but a reference - whatever is displayed in Column C will change if Column B changes, and will vanish if Column A no longer equals "something".
Does that help?
-
Thank you for your response. Of course I left out critical information. Column C is a dropdown list because when Column A is not a specific value, I can manually select the appropriate value from the dropdown in Column C.
-
That should be fine @LinMyers
You can put your formula in the cell even if it is a dropdown (and if it is restricted and you are admin you can "OK" the error message). It will return nothing if Column A does not equal something and when it does it will return whatever is in Column B.
As soon as you select anything manually, you will overwrite the formula. Will that be a problem?
-
Sadly, that doesn't work. Once I add the formula to Column C (which works), I lose the ability to select from the dropdown, even though the column type is still a dropdown.
-
Did you make the formula a column formula? You should be able to select from the drop down if it is a cell formula.
-
Yes, it is a column formula and the field type is still a dropdown.
-
If you want an automatic selection made as well as the ability to use manual selection, you will need to set up a Change Cell automation instead of using a formula.
-
Hi @LinMyers
If you use a column formula in any situation (not just a drop downs), you are not able to also manually edit the cell. If you want to use a formula to populate column C , then your options are:
- Use a cell formula in column C rather than a column formula
- Put your manual drop down in a different column (say column D) and use a column formula in column C to return the value from column B if A is "something" and the value from column D, if it is not. That formula would be:
=IF([column A]@row="something",[column B]@row,[column D]@row)
Your third option, like Paul says, is to use an automation instead of a formula. You can find more information on automations here:
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!