Loading...
Quick Links

Reply To: counting the number of predecessors

Home Forums Discussion counting the number of predecessors Reply To: counting the number of predecessors

#408815
Timothy JonesTim Jones
Guest

Update: This formula is better than the Len([Predecessors]) formula from my initial reply:

IIf(LEN([Predecessors])>0,LEN([Predecessors])-LEN(REPLACE([Predecessors],”,”,””))+1,0)

The Len([Predecessors]) formula returns a count that includes the commas in the string; the new formula removes the commas, adds “1” (because there will be one more predecessor than there are commas), and then takes the difference, returning the exact number of predecessors.

I’m updating this so long after the original post because I recently had a need to use this formula and did a little more searching to find a way to get the exact number of predecessors:)