"in range" is too vague.
It's always 1d20 for TN or less. Presuming aimed shot (rather than snap shot)
At short range, TN = 2*(Dex + Skill)
At medium range, TN = (Dex + Skill)
At Long Range TN = 0.5 * (Dex + Skill)
At Extreme Range, TN = 0.25 * (Dex + Skill)
Note that the specific distances vary by weapon, and are not Range Bands as used in other editions.