Question on using IF, MAX, Collect, HAS to return criteria from multiple columns

Hello,
I have a form to submit certifications where the user enters their email address and a date of completion. Then in another sheet, I have employee data that includes a primary email and a secondary email.
I have a column in the 2nd sheet that uses max and collect to pull the date of the certification completion using references from the form that looks like this
=MAX(COLLECT({Completion Date}, {Email}, [Primary Email]@row, {Training}, HAS(@cell, "Training Name")))
My issue though is that some users in the sheet have a primary email, some are alternate emails, and so the form has a mix of submissions where some users submit with their primary and others using their alt email.
I'd like the ability to have some type or OR function, where it checks to verify the email in the PRIMARY EMAIL first and if that is not a match then try to do the same thing using the [Alternate Email]@row instead.
Any suggestions?
Answers
-
Hello! Not sure I fully understand - can you show an example of your sheet(s) setup?
-
Try the below it should bring in the Max value between the two collect functions. I did a similar formula that worked for me.
=MAX(COLLECT({Completion Date}, {Email}, [Primary Email]@row, {Training}, HAS(@cell, "Training Name"),COLLECT({Completion Date}, {Email}, [Alternate Email]@row, {Training}, HAS(@cell, "Training Name"))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.1K Get Help
- 448 Global Discussions
- 154 Industry Talk
- 504 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 513 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!