# Writing a formula for a spread sheet that can solve for a given value

For instance if given values are $f(1.1) = 1$, $f(1.9) = 2$, $f(2.7) = 3$, $f(3.5) = 4$, $f(4.3) = 5$ and ever increasing by $0.8$ for each number, if I were to enter a value of $1.5$ the answer is $1.5$ but if I enter $2.3$ the answer is $2.5$ what is a formula that would express this?

-
sorry i did not understand question,is it about rounding number? –  dato datuashvili Mar 29 '13 at 20:28
i think you can search about ceil and floor function –  dato datuashvili Mar 29 '13 at 20:29
no not rounding its a specific gravity problem at a reading of 0 I get 0 at 1oz per gallon I get sg of 1.1 at 2oz per gallon I get 1.9sg at 3oz per gallon I get 2.7sg, the sg goes up by .8 from this point on, I need a formula so I can calculate the oz per gallon from any specific gravity reading. –  user70070 Mar 29 '13 at 20:40

Your required formula should be $$f(x)=\frac{x-0.3}{0.8}$$