Using IF/AND statements with JOIN/COLLECT
I'm trying to pull selections from a list on a source sheet based on multiple criteria on both the source and destination sheets. I can set up the IF formula with JOIN/COLLECT to match one criteria, but struggling using IF(AND(… in order to match multiple criteria.
In my source sheet I have a list of training modules that need to be completed, depending on what level someone is hired at, as well as what time of year they're hired. Here's the formula I'm using:
=IF(AND(Title@row = "Associate", Hiring Season@row = "Summer", {Onboarding Duration Range 6} =1), JOIN(COLLECT({Onboarding Duration Range 1}, {Onboarding Duration Range 5}, HAS(Title@row, @cell)), ", "))
Where Range 6 is the "Summer" column, Range 1 is the "Training" column, and Range 5 is the "Associate" column.
If I remove the AND portion and only look up based on Title, I get all training sessions, regardless of the corresponding season. Hoping there's a way I can pull by both.
Best Answer
-
Hello @Chrissy P
Try adding your Range 6 as additional criteria on your collect function. That would be:
=IF(AND(Title@row = "Associate", Hiring Season@row = "Summer"), JOIN(COLLECT({Onboarding Duration Range 1}, {Onboarding Duration Range 5}, HAS(Title@row, @cell),{Onboarding Duration Range 6},1), ", "))
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined
Answers
-
Hello @Chrissy P
Try adding your Range 6 as additional criteria on your collect function. That would be:
=IF(AND(Title@row = "Associate", Hiring Season@row = "Summer"), JOIN(COLLECT({Onboarding Duration Range 1}, {Onboarding Duration Range 5}, HAS(Title@row, @cell),{Onboarding Duration Range 6},1), ", "))
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined -
That worked! Thank you!
-
Happy to help! 😊
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.1K Get Help
- 450 Global Discussions
- 155 Industry Talk
- 505 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 514 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!