Rankeq and Collect formula
I am having trouble with a Collect formula when I add another criteria. The Collect formula is embedded in a Rankeq formula. This formula (Rank column) works:
=IFERROR(RANKEQ(DateNum@row, COLLECT(DateNum:DateNum, DateNum:DateNum, @cell <> ""), 0), "")
When I add to the Collect portion of the formula (RankKL column) I get a blank.
=IFERROR(RANKEQ(DateNum@row, COLLECT(DateNum:DateNum, DateNum:DateNum, @cell <> "", Type:Type, "Key Leaders"), 0), "")
If I just use =COUNT(COLLECT(DateNum:DateNum, Type:Type, "Key Leaders")), I get a 1, whereas I thought it should be 3.
Any help would be appreciated.
Best Answers
-
What does this give you?
=COUNTIFS(Type:Type, "Key Leaders")
-
That's because there is a matching Datenum entry that has "Key Leaders".
Wrap the whole thing in an IF statement.
=IF(Type@row = "Key Leaders", RANKQ)
Answers
-
What does this give you?
=COUNTIFS(Type:Type, "Key Leaders")
-
The Type column has a vlookup formula, however, I didn't account for a "No Match" result in other rows. As soon as I added an IFERROR, to clear the error, everything calculated. I wouldn't have found it without your suggestion to try the COUNTIF formula. That resulted in a No Match which pointed me in the right direction. Thanks for your help.
-
The only strange thing is if Datenum is the same, it's ranked even if the Type is not Key Leaders.
=IFERROR(RANKEQ(DateNum@row, COLLECT(DateNum:DateNum, DateNum:DateNum, @cell <> "", Type:Type, "Key Leaders"), 0), "")
-
That's because there is a matching Datenum entry that has "Key Leaders".
Wrap the whole thing in an IF statement.
=IF(Type@row = "Key Leaders", RANKQ)
-
Thanks!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!