In this work we investigate the diffusion and the electrical activation of In atoms implanted in silicon with different energies, in the range 80-360 keV, after rapid thermal processing. Our investigation shows a clear dependence of In out-diffusion and electrical activation on the implant depth, being the electrically active fraction higher with increasing the implant energy for a fixed dose. The data are explained considering the balance between the local In concentration and the C background inside the silicon substrate and the formation of C-In complexes, which play a role in the enhanced electrical activation due to the shallower level they introduce into the Si band gap (Ev+0.111 eV), with respect to the rather deep level (Ev+0.156 eV) of In alone. In and C co-implantation has also been studied within this work, in order to confirm the key role of C in the increase of the electrical activation. A large increase of the electrical activation has been detected in the co-implanted samples, up to a factor of about 8 after annealing at 900°C. However, C precipitation occurs at 1100°C, with dramatic effects on the carrier concentration.