Join IF Contact Type = Customer
I have a sheet with the following columns:
Contact Type | Email
In the Sheet Summary, I have a field where I would like to create an email string that can easily be used to paste a bunch of email separated by a semi-colon for easy sharing.
I want to join all emails where Contact Type is "Customer" into a single field with the email separated by a ";" and if the email field is blank, I want it ignored.
Not sure if I would set this up as an IF with a JOIN or a JOIN with an IF.
I have this so far, but it's not working: =IF(AND([Contact Type]@row = "Customer", email@row <> ""), JOIN(Email:Email, " ;"))
Thank you in advance
Best Answer
-
Maybe something like this?
=JOIN(COLLECT(Email:Email, [Contact Type]:[Contact Type], ="Customer", Email:Email, <>""), ";")
Answers
-
Try This:
=(IF(AND([Contact Type]@row = "Customer", Email@row <> ""), [Contact Type]@row + ";" + Email@row))
-
-
sorry, I realized that I have a couple of extra parentheses.
=IF(AND([Contact Type]@row = "Customer", Email@row <> ""), [Contact Type]@row + ";" + Email@row)
I just tested this in a third column and it is working, but only on a per row basis. Based on what I am reading in your original post, you are looking to collect all of the cells that meet these criteria into one cell?
-
Maybe something like this?
=JOIN(COLLECT(Email:Email, [Contact Type]:[Contact Type], ="Customer", Email:Email, <>""), ";")
-
You will need a JOIN/COLLECT combo for this:
=JOIN(COLLECT(Email:Email, Email:Email, @cell <> "", [Contact Type]:[Contact Type], @cell = "Customer"), "; ")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 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!