Formula help with Index Match and Contains
Here is what i have in 2 ways but neither work:
IF(CONTAINS("X1", [Model Type]@row), INDEX({Other Sheet Range}, MATCH([Email 2]@row, {Other Sheet Email Range}, 0)), "")
IF(CONTAINS(INDEX({model}, MATCH([Email]@row, {assignee}, 0)), "X1"), INDEX({serial number}, MATCH([Email]@row, {assignee}, 0)), "")
My goal is to retrieve the serial # of a model column that contains "X1" in the name, using email addresses as the matching criteria. we have an asset inventory but some people have a desktop and laptop and i only need the laptops that have X1 in them and not Macbooks.
Any suggestions?
Answers
-
It sounds like you want to retrieve (INDEX) the serial number based on two criteria: The model column contains XI and the email address matches the email on the current sheet. In which case INDEX COLLECT will probably work. It would look something like:
=INDEX(COLLECT({serial number}, {Other Sheet Email Range}, [Email 2]@row, {model}, CONTAINS("XI", @cell)), 1)
I would wrap that in an IFERROR to return nothing if there isn't a match
=IFERROR(INDEX(COLLECT({serial number}, {Other Sheet Email Range}, [Email 2]@row, {model}, CONTAINS("XI", @cell)), 1), "")
This is returning the value in the column you have cross sheet referenced as {serial number} when the value in the column you have have cross sheet referenced as {Other Sheet Email Range} matches the value in Email 2 on the current row and the value in the the column you have cross sheet referenced as {model} contains "XI".
Hope this helps.
-
Thank you @KPH
- how would i add and OR statement to look up one or the other model? would it be like this?
=IFERROR(INDEX(COLLECT({serial number}, {assignee}, [Primary Column]@row, {model}, CONTAINS("Think", @cell, OR("Opti", @cell)), 1), ""))
-
Almost. Try re-writing the formula like this:
=IFERROR(INDEX(COLLECT({serial number}, {assignee}, [Primary Column]@row, {model}, OR(CONTAINS("XI", @cell), CONTAINS("OPTI", @cell))), 1), "")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!