
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 07, 2024 10:45 AM
Hi,
I have a formula that almost works. I'm trying to make my primary field a formula where it looks at "Column A" and looks at "Column B". If a there's a value in "Column A", enter that value as the primary field. If there's a value in "Column B", enter that value in the primary filed. If there's a value in both "Column A" and "Column B", combine those two values and place a "/" between the two fields. The formula I have looks like this:
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 08, 2024 04:46 AM
Hi,
Gladly, Airtable formula flexibility allows to avoid over-engineering
{Column A} & IF({Column B},
IF({Column A},'/')&{Column B})
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 07, 2024 03:27 PM - edited ‎Aug 07, 2024 03:29 PM
It looks like you're trying to create a formula that combines values from two columns, but you're encountering issues with extraneous slashes when only one column has a value. To resolve this, you need to ensure that the slash is only added when both columns have values. Here’s how you can adjust your formula:
IF(
AND({Column A} != BLANK(), {Column B} != BLANK()),
CONCATENATE({Column A}, "/", {Column B}),
IF(
{Column A} != BLANK(),
{Column A},
{Column B}
)
)
In this formula:
AND({Column A} != BLANK(), {Column B} != BLANK()) checks if both columns have values. If true, it concatenates them with a "/" between.
IF({Column A} != BLANK(), {Column A}, {Column B}) checks if only one column has a value and returns that value. It ensures that if only one of the columns has data, no extra slash is added.
Ensure that:
Column Names: Use curly braces {} around your column names correctly.
Blank Checking: Use != BLANK() to check for empty values.
This formula should correctly handle cases where:
Both columns have values: Combine with a "/".
Only "Column A" has a value: Return that value without an extra "/".
Only "Column B" has a value: Return that value without an extra "/".
Try using this adjusted formula and see if it resolves the issue with unwanted slashes.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 07, 2024 10:50 PM
Try this:
IF(
AND(
{Column A},
{Column B}
),
{Column A} & "/" & {Column B},
IF(
{Column A},
{Column A},
{Column B}
)
)
 
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 08, 2024 04:46 AM
Hi,
Gladly, Airtable formula flexibility allows to avoid over-engineering
{Column A} & IF({Column B},
IF({Column A},'/')&{Column B})

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 08, 2024 05:46 AM
Thank you Saravanan for the response. The above formula still left the "/" mark character if only Column A or Column B had a value. Others in this thread provided a solution to get rid of the "/" mark when Column A or Column B had a value.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 08, 2024 05:47 AM
Thank you The TimeSavingCo. This formula works like a charm!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 08, 2024 05:48 AM
Thank you Alexey_Gusev. This formula works great! I appreciate how concise the formula is.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Feb 03, 2025 05:43 AM
@Alexey_Gusev with your solution above (from last Aug), is it possible to add addtioinal steps for my use case
If C = asset01
and A is blank and B is not blank, 'missing A'
and or A is not blank and B is blank, 'missing B'
and or A & B are blank, 'missing A & B'
and or A & B are not blank, 'all ok'
I hope that makes sense!
Todd
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Feb 03, 2025 06:33 AM - edited ‎Feb 03, 2025 06:34 AM
IF(C='asset01',
IF(A,IF(B,'all ok','Missing B'),
IF(B,'Missing A','Missing A & B')))
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Feb 03, 2025 07:28 AM
@Alexey_Gusev thank you!
How can I add a second Asset with similar rules?
If C = asset01
and A is blank and B is not blank, 'missing A'
and or A is not blank and B is blank, 'missing B'
and or A & B are blank, 'missing A & B'
and or A & B are not blank, 'all ok'
AND
If D = asset02
and E is blank and F is not blank, 'missing E'
and or E is not blank and F is blank, 'missing F'
and or E & F are blank, 'missing E & F'
and or E & F are not blank, 'all ok'
