Index collect formula
Can anyone help me with a formula? I am trying to sum a column from another sheet based on what is selected in a multi select dropdown. I worked with the Pro Desk at Smartsheet and they provided me with this formula, however its not working . Perhaps I have parenthesis or comma off someplace??
=IFERROR(SUM(INDEX({Team Revenue PY and YTD 2023 -2023 YTD}, COLLECT(HAS(@cell, [Producer/Team Name(s)]@row, {Team Revenue PY and YTD 2023 Prod/Team Name}), 0))), "")
Best Answer
-
Oh my word! Yes, that's it!!!
=SUMIFS({Team Revenue PY and YTD 2023 -2023 YTD}, {Team Revenue PY and YTD 2023 Prod/Team Name}, HAS([Producer/Team Name(s)]@row, @cell))
Thank you so much Paul!
Answers
-
If you are trying to add multiple cells together (sum) based on criteria in other columns (ifs), then you would need a SUMIFS.
-
Thanks Paul, I tried SUMIFS, but perhaps do I have something wrong below?
=IFERROR(SUMIFS(INDEX({Team Revenue PY and YTD 2023 -2023 YTD}, COLLECT(HAS(@cell, [Producer/Team Name(s)]@row, {Team Revenue PY and YTD 2023 Prod/Team Name}), 0))), "")
-
You don't need the INDEX or COLLECT or IFERROR functions. Just the SUNIFS following the suggested syntax.
-
Sorry perhaps I am not explaining this well. I need it to Sum a column in a different sheet based on the selections contained in a muti select dropdown within my sheet. some dropdown selections include 1 entry, some include 4. If 4 entries are selected then I need them to add all 4 team totals together..
-
Yes. You still need the SUMIFS, and you still don't need the INDEX, COLLECT, or IFERROR. You will need the HAS function though.
=SUMIFS({range to sum}, {criteria range}, HAS(@cell, "text string"))
-
I am not sure what you mean by "text string"?
-
Whatever string you are looking for in the multi-select dropdown.
-
ok still not understanding exactly what you mean, so this cant be set up as a column formula..?
-
It can be a column formula. I'm not sure I understand your question. Have you tried creating the formula yet?
-
Here's what I have =SUMIFS({{Team Revenue PY and YTD 2023 -2023 YTD}}, {{Team Revenue PY and YTD 2023 Prod/Team Name}, HAS(@cell, "*Christopher Black*James GravesBusch/ScaringeWoods/Morris"))
-
And is it giving an error or an unexpected number?
-
=SUMIFS({Team Revenue PY and YTD 2023 -2023 YTD}, {Team Revenue PY and YTD 2023 Prod/Team Name}, HAS(@cell, "*Christopher Black*James GravesBusch/ScaringeWoods/Morris"))
This formula gave me a 0
-
In that case there are no cells that contain your text string. Double check your spelling to ensure there is at least one entry in at least one cell that matches exactly.
-
In this case someone selected 4 choices in the drop down, not sure how the text string should look exactly?
however every row will have different data entered.
=SUMIFS({Team Revenue PY and YTD 2023 -2023 YTD}, {Team Revenue PY and YTD 2023 Prod/Team Name}, HAS(@cell, "*Christopher Black*James GravesBusch/ScaringeWoods/Morris"))
-
on the source sheet, they each are in different rows with different totals
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!