How to determine the value - 23 Dec?

E

Eric

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
 
P

Pete_UK

This returns the values you want in D1:

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

Hope this helps.

Pete
 
D

David Biddulph

Did you try =C1+MOD(A1,B1) ?

May I ask, Eric, whether you are actually making any effort to learn
anything about Excel? You have been asking countless questions, and have
received vast amounts of free advice from members of the group, but instead
of trying to learn from the advice you have received you still seem to be
treating the group as an easy way of getting an answer instead of thinking
about the problem yourself.

You are likely to find that even the long patience of contributors to the
group may be running short.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top