View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default How to determine the value - 23 Dec?

This returns the values you want in D1:

=IF(C1A1,A1+10*(1+INT((C1-A1)/10)),A1-INT((A1-C1)/10)*10)

Hope this helps.

Pete

On Dec 23, 8:10*am, Eric wrote:
Does anyone have any suggestions on how to determine the value?
There is a value 144 in cell A1,
There is a value 10 in cell B1,
I input 140 in cell C1, as 144 = 140 = 134 (144-10), then it return 144 in
cell D1.
I input 150 in cell C1, as 150 = 144, then it return 154 (144+10) in cell D1.
I input 160 in cell C1, as 160 = 144, then it return 164 (144+10*2) in cell
D1.
I input 170 in cell C1, as 170 = 144, then it return 174 (144+10*3) in cell
D1.

I input 130 in cell C1, as 134 (144-10) = 130, then it return 134 in cell D1.
I input 120 in cell C1, as 124 (144-10*2) = 120, then it return 124 in cell
D1.
I input 110 in cell C1, as 114 (144-10*3) = 110, then it return 114 in cell
D1.
I input 100 in cell C1, as 104 (144-10*4) = 100, then it return 104 in cell
D1.

Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric