I have 18,000 observations in a variable, which I have cleaned down to 60 left to address.
They are supposed to be pH values, normal format: 7.40

The trouble is, many say:
4.42, when it should be 7.42
7036, when it should be 7.036
696, when it should be 6.96
.701, when it should be 7.01

For the first example, I need to replace any non 7 integer ahead of the decimal with a 7. Example with 4.
I attempted
Code:
replace var=7.* if var==4.*
This errored "cannot find if." I am assuming you cannot use this expression on observations, but only variables? It seems * doesn't work in observations. So is there a way to do similar work on observations? I cannot think of anything.

For the last 3 examples, I simply need to move decimal places, which I could do by multiples or divisions of 10,100, etc. However, must I manually adjust each one, or can I somehow indicate that each observation "formatted" as **** or *** or .*** should be replaced by *.*** ? This would need to actually involve changing the numbers' true values, not just changing format in variable properties.

Thank you.