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!
-
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.7K Get Help
- 438 Global Discussions
- 152 Industry Talk
- 497 Announcements
- 5.3K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 77 Community Job Board
- 509 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!