Array Difference?

I’d like to remove all items that are present in one array from another array in a formula. Ex:

Array1 [Blue, Orange, Green, Yellow]
Array2 [Blue, Orange]

Array1 - Array2 = [Green, Yellow]

Is this possible?

Here’s one way you can do it!

Depending on your specific use-case there may be better ways but this should give you a good enough starting point

Took me a bit of head scratching but I think this should work for you if you want to keep it all within a formula:


=Look at each item in Array1. If it’s not in array 2, let it pass through the filter and be kept in our output array

Edit: Scott’s image wasn’t showing for me initially, didn’t realize this is exactly the same solution :joy:

1 Like

Thanks Scott! Works great!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.