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
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!