Share

help from the great programmers please

Avatar

can someone please give me the formula to take the zero -1 and get the nine instead of a negative one. example 003-111=992 i would like to do my own spreadsheet so i cand make my own modification where needed.

Avatar

for this example assume the target cell  is A1.  =mod(a1,10)   divide number by 10 show only remainder

 

for this example  you have data in a1and  b1  your result is in c1.  in c1   =mod(a1-b1,10)   divide result by 10 show only remainder

 

for your specific example. 3 digit numbers    =mod(a1-b1,1000)   divide result by 1000 and show only remainder

Unkle Richie's avatar - Lottery-001.jpg
In response to phileight

Yep, What he said

Avatar

thanks for the help much appreciated!!!!

Avatar

i am using openoffice it is giving me error511?

Avatar

I don't use open office but from what I understand many things are very similar.  check the help file for the proper usage for the " mod " command in open office

Avatar

Syntax:

MOD(number; divisor)

For integer arguments this function returnsnumber modulodivisor, that is the remainder whennumber is divided bydivisor.This function is implemented asnumber - divisor * INT( number/divisor) , and this formula gives the result if the arguments are not integer.

Example:

MOD(22; 3)

returns1, the remainder when22 is divided by3.

MOD(11.25; 2.5)

returns 1.25.

 

they use a semi colon instead of comma

Avatar
In response to phileight

thanks for your help i will give that a try . THANKS AGAIN

Avatar

there must be something missing like the if or something now it is simply adding a neg111 to my number. sorry tobe a pain i had this last year but i didnt have my computer backedup then it had a hard drive failure so i lost it all. back then it took me a month to get it with research i was hoping to eliminate all the research.

Avatar

maybe I have misunderstood what you are trying to do    if cell  a1 is 003  and cell b1 is 111   and in cell c1 you have the formula   =mod(a1-b1;1000) then it should show 892.  if this is not what you want,  try stating the problem again with the expected answer.

Avatar

using003-111=992

Avatar
In response to notmyday

wanting todo a -111 rundown from previous number but 0 needs to bring a 9

Avatar

to do that you will need to break the digits apart and deal with each separately.     cell a1 0  b1 0  c1 3    cell a2 1  b2 1  c2 1

cell e1    =mod(a1-a2;10)     cell f1   =mod(b1-b2;10)   cell g1   =mod(c1-c2;10)    cell I1  =e1 & f1 & g1

 

several steps and obviously adjust cell references as needed. the last step would work in Excel  open office ???

Avatar

great that worked ill put more in to check thank you so much now i can get busy with the rest.

SergeM's avatar - slow icon.png
In response to notmyday

You were doing:

10 - 1
10 - 1
3 - 1
=
9
9
2

What ever you do, you get some row where you want the unique numbers from.

Up to you to work it out according to your fancy ideas and your fancy rules.

Instead of 003 you can split to three columns to simplify the task. Excel is made for Cells, it is Excellent-Cell,
or excel with cells?

Welcome Guest

Your last visit: Sun, Sep 19, 2021, 9:06 pm

Log In

Log InCancel

Forgot your username?

Forgot your password?