With[{ints = Range[100]}, Pick[ints, Clip[Total[IntegerDigits[ints], {2}], {-∞, 5}], 5]] Using `Nothing`: With[{ints = Range[100]}, ints /. Thread[PositionIndex[Clip[Total[IntegerDigits[ints], {2}], {4, ∞}]][4] -> Nothing]]