Excel loop to change values of cells

Associate
Joined
29 Jun 2006
Posts
470
Location
Cheshire
Howdy,

I have a column of numbers in Excel such as 56.0231, 0.02123, 23.0123, 19.93213, 34.5543, 99.4657 and so on... 30,000 of them in fact.

What I need to do is replace any cell in this column which has a value of less than 1 with 1.0 and any cell which has a value of greater than 99 with 99.0

The ordinary find/replace won't work because of the figures after the decimal points stored. I guess I need some kind of loop which goes through all the cells in the column checking to see if it meets the criteria and replacing the value otherwise leaving it alone.

But I don't know how to program this! Can anyone do it for me, purlease?
 
Back
Top Bottom